-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract and recover structure of extras (#48)
* Collect and translate named extras * Test and fix the extraction of extras, and in particular of extras embedded within other extras. * Add locations to the root of extra subtrees. We could add locations to all nodes of the CST but that would require massive (but easy) changes to the legacy code in semgrep. * Update test expectations * Add a test (which currently fails) * Fix: Translators for rules appearing only in extras were removed. * Port extras to the new dumping mechanism * Add a naming test * Fix extra dumpers * Use polymorphic variants to represent extras. This is for consistency with the CST as well as allowing tricks such as merging the TypeScript and TSX CST types. * Populate tree-sitter-version file without an extra step * Fix 'cd: downloads: No such file or directory' * Make script more robust (?)
- Loading branch information
Showing
29 changed files
with
435 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,6 @@ type node = { | |
} | ||
|
||
type position = { | ||
row: int; | ||
column: int; | ||
row: int; (* 0-based *) | ||
column: int; (* 0-based *) | ||
} |
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.