This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BIG refactoring, add far more tokens in the different ASTs and AST ge…
…neric Description: sgrep sometimes fails with an OCaml exception about an empty list of tokens (either FakeTok error or min_max_ii error) because a metavariable may match something (an expr or stmt) that does not contain any token information. This in turns mean we can not display location information for this matched thing. This diff should help fix semgrep/semgrep#73 and semgrep/semgrep#52 because it adds lots of token information in the different ASTs. I originally skipped those tokens because I wanted an AST, not a CST, but in the ends it bites back and we want many of those tokens (at least enough token so we never get the error above). See ast_generic.ml for the rational. test plan: make test
- Loading branch information
Showing
48 changed files
with
1,514 additions
and
968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.