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

Reuse lexer and parser between tests #84

Open
ris58h opened this issue Jun 19, 2023 · 2 comments
Open

Reuse lexer and parser between tests #84

ris58h opened this issue Jun 19, 2023 · 2 comments

Comments

@ris58h
Copy link

ris58h commented Jun 19, 2023

Both Lexer and Parser have setInputStream method so they can be reused. We could add an option to reuse them between tests of the same grammar to make sure it works properly.

@KvanTTT
Copy link
Member

KvanTTT commented Jun 21, 2023

I'm not sure if it makes big sense because I suspect it almost doesn't affect performance.

@ris58h
Copy link
Author

ris58h commented Jun 21, 2023

It's not about performance but verification. I had an issue with JavaScript lexer that affected my project. Reusing lexer and parser will allow us to test such case.

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