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

Bad peggy-tag coloring #24

Open
hildjj opened this issue Jun 5, 2022 · 2 comments
Open

Bad peggy-tag coloring #24

hildjj opened this issue Jun 5, 2022 · 2 comments

Comments

@hildjj
Copy link
Contributor

hildjj commented Jun 5, 2022

see the tests for peggy-tag with release 2.3.0 loaded in vscode: https://github.com/peggyjs/peggy-tag/blob/da6744153604aa10418de49801bd03d82b9235f5/test/index-spec.js

Assigned to: @sanket143

@hildjj
Copy link
Contributor Author

hildjj commented Jun 6, 2022

It looks like this is because the tag on line 12 has an intentionally-invalid grammar. I can live with that, although I wish there was better error reporting. Let's turn this issue into: "syntax-checking of embedded peggy grammars in template strings".

@sanket143
Copy link
Contributor

Hey, sorry, I don't get much time on week days so may not be very active but I did look briefly into this and I think it may have to do with how illegal string is identified.

 ​                            ​"name"​: ​"​invalid.illegal.string.peggy​"

https://github.com/peggyjs/code-peggy-language/blob/main/syntaxes/peggy.json#L71

but on the other hand I was also expecting vscode to end parsing the snippet as peggy, once it encountered '`'

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