Replies: 1 comment 1 reply
-
If the parser returns an error, you should cancel any lexing goroutines. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, i using my custom lexer, it far reminds Rob Pike's lexer (really far, but mechanics are still pretty same).
I worry, that if parser fails parsing any input, my lexer's goroutine is still can't be stopped, cause it doesn't understand, does the parsing still going, or is it cancelled...
So question is, am i able somehow to get context of parsing inside lexers? If not, is it a good idea to implement this feature and create pull request?
Beta Was this translation helpful? Give feedback.
All reactions