Skip to content

Is it possible to access the offset for where a parsed node appears in the source string? #1947

Closed Answered by manticore-projects
broneill asked this question in Q&A
Discussion options

You must be logged in to vote

Reading again, I think I understand your requirement better: You want to get the position of a particular token (which you throw an error for).

Most, but not all Productions link the AstNode, which should give your this position.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@broneill
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@broneill
Comment options

Answer selected by broneill
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants