Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Var.Pos.Line field that can be used in Where filters #146

Closed
quasilyte opened this issue Dec 21, 2020 · 0 comments · Fixed by #234
Closed

Add Var.Pos.Line field that can be used in Where filters #146

quasilyte opened this issue Dec 21, 2020 · 0 comments · Fixed by #234
Labels
DSL May require DSL changes

Comments

@quasilyte
Copy link
Owner

The one thing I needed is Pos.Line so we can check whether m["x"] and m["y"] located on the same source code line.
I'm not sure we need Pos.Col or Pos.Filename (since we have m.File().Name).

Given that it looks like only Line is useful, maybe it should be Var.Line instead of Var.Pos.Line, although the "Line" meaning will be less obvious without looking at the documentation while Var.Pos.Line gives the necessary context for the reader.

@quasilyte quasilyte added the DSL May require DSL changes label Dec 21, 2020
quasilyte added a commit that referenced this issue May 1, 2021
Line is a source code line number that contains this match.
If this match is multi-line, this is the first line number.

Refs #146
quasilyte added a commit that referenced this issue May 1, 2021
Line is a source code line number that contains this match.
If this match is multi-line, this is the first line number.

Refs #146
quasilyte added a commit that referenced this issue May 1, 2021
quasilyte added a commit that referenced this issue May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSL May require DSL changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant