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

Support tracing across reference boundaries #86

Closed
shyndman opened this issue Nov 8, 2020 · 5 comments
Closed

Support tracing across reference boundaries #86

shyndman opened this issue Nov 8, 2020 · 5 comments

Comments

@shyndman
Copy link

shyndman commented Nov 8, 2020

Hi there,

I noticed that trace parsers are unable to trace the "children" of Reference parsers, which would be handy.

I got around this without too much trouble (little code change, and introduced the trace in the referenced function), but it would be really nice to see a cohesive trace through the entirety of the input, with proper indentation and all that.

Anyway, thanks! This library has proven useful for a tiny DSL I'm writing.

@shyndman
Copy link
Author

shyndman commented Nov 8, 2020

Ah, I see now why this is a little tricky. Hmmm

@renggli
Copy link
Member

renggli commented Nov 8, 2020

Reference boundaries disappear when the parser is built, I don't see how they would affect the trace if it is applied just before parsing? Can you provide an example?

@shyndman
Copy link
Author

shyndman commented Nov 8, 2020

So right now I'm applying the trace inside my GrammarDefinition...should I be wrapping my GrammarParser instance in the trace instead?

@shyndman
Copy link
Author

shyndman commented Nov 8, 2020

Yes. That worked perfectly. Thank you.

@shyndman shyndman closed this as completed Nov 8, 2020
@renggli
Copy link
Member

renggli commented Nov 8, 2020

Yeah, it does not work inside the GrammarDefinition, it only works after the parser is built. Similar issue as #39.

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