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

Pos field not automatically populated for structs implementing Capture() #35

Closed
texttheater opened this issue Oct 2, 2018 · 3 comments

Comments

@texttheater
Copy link

It appears that structs that implement Capture() do not get their Pos lexer.Position field automatically populated like other grammar nodes. The Capture method cannot do this either, because it does not get passed any positional information. Is this intentional or an oversight?

@alecthomas
Copy link
Owner

A bug! The check for Capture must take place before the Pos update. I’ll push up a fix today, thanks for reporting!

@alecthomas
Copy link
Owner

Fixed in f14a17d.

@texttheater
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants