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
Missing ASI when parsing a semgrep pattern #1960
Labels
Comments
Thanks for the report. It looks like Semgrep unnecessarily requires a |
aryx
changed the title
Error when parsing statements inside function expressions in patterns
Missing ASI when parsing a semgrep pattern
Nov 10, 2020
aryx
added a commit
to semgrep/pfff
that referenced
this issue
Nov 10, 2020
This does the same error-recovery and ASI at error-recovery that we do when parsing code for parsing the pattern. This will help semgrep/semgrep#1960 test plan: see related PR in semgrep
aryx
added a commit
that referenced
this issue
Nov 10, 2020
This does the same error-recovery and ASI at error-recovery that we do when parsing code for parsing the pattern. Fixes #1960 test plan: test file included also $ /home/pad/semgrep/_build/default/cli/Main.exe -lang js -dump_pattern misc_asi_pattern.sgrep does not return a parse error anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to match this
I tried this pattern https://semgrep.dev/s/6WGK/
Got:
Pattern could not be parsed as a Javascript semgrep pattern
Run with docker image: 0.29.0
I did find a pattern that works, but I don't understand why the first one did not.
https://semgrep.dev/s/olPX/
The text was updated successfully, but these errors were encountered: