-
Notifications
You must be signed in to change notification settings - Fork 990
feat(dart): Dart 3 grammar bump, parser fixes, and pattern-mode capabilities #11678
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
Closed
AlexLaroche
wants to merge
27
commits into
semgrep:develop
from
AlexLaroche:alexandre/bump-tree-sitter-dart
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9ea82d9
fix(dart): bump tree-sitter-dart and adapt OCaml mapper for Dart 3
AlexLaroche 34ce0d7
fix(dart): improve parser fidelity for methods, strings, and construc…
AlexLaroche df0cc3a
chore(dart): drop stale segfault gate now that grammar is fixed
AlexLaroche 0e9f348
chore(dart): point semgrep-dart submodule URL at fork for validation
AlexLaroche 3f11846
fix(dart): adapt OCaml mapper to new CST shapes from grammar fixes
AlexLaroche ba745c7
fix(dart): adapt OCaml mapper to abstract field / external var CST sh…
AlexLaroche e284158
fix(dart): adapt OCaml mapper to label/operator identifier CST shapes
AlexLaroche b7264bb
fix(dart): map empty-statement CST to a Block
AlexLaroche 7160dfe
fix(dart): map external instance field CST to a VarDef
AlexLaroche ebc4e92
fix(dart): adapt OCaml mapper for for-loop and field-initializer changes
AlexLaroche 7763a04
fix(dart): adapt OCaml mapper for null-aware map key CST
AlexLaroche 747b3cf
feat(dart): allow null-assertion in cascades and ffi external get/set…
AlexLaroche 45984ee
feat(dart): unnamed library directive, full symbol literals, single-n…
AlexLaroche 23421ce
fix(dart): adapt OCaml mapper for record-return method CST
AlexLaroche c16a3ae
fix(dart): prefer statement parse for patterns starting with stmt key…
AlexLaroche 6fdd600
fix(dart): preserve uninitialized local variable declarations
AlexLaroche f156970
fix(dart): route `await` and `rethrow` patterns through stmt parse
AlexLaroche f62f585
style(dart): apply ocamlformat 0.29.0
AlexLaroche ef4d2e3
feat(dart): support typed metavariable `$X as T` and `metavariable-type`
AlexLaroche 89fd621
feat(dart): bind metavariables inside string interpolations
AlexLaroche ec175d5
fix(dart): function-definition patterns match function definitions
AlexLaroche 17b9fb7
test(dart): cover typed metavar, metavariable-type, string-interp met…
AlexLaroche 6817d07
test(dart): cover parser bug fixes and Dart 3 grammar features
AlexLaroche 95426eb
chore(dart): bump semgrep-dart submodule to a28267f for record_return…
AlexLaroche 38f5f8f
test(dart): approve dart3_grammar_features parsing snapshot
AlexLaroche 15c9a6f
chore(dart): point semgrep-dart submodule at canonical upstream
AlexLaroche f47427d
chore(dart): keep `.git` suffix on semgrep-dart submodule URL
AlexLaroche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore(dart): point semgrep-dart submodule at canonical upstream
Switch the submodule URL from the AlexLaroche fork back to returntocorp/semgrep-dart, and bump the pointer to 0202e42 (yosef's just-merged PR #1, regenerated against UserNobody14/tree-sitter-dart 02e9bb19). Drop the `Labe_stmt` arm from the OCaml mapper: enabling `$.labeled_statement` was a local patch on top of the upstream grammar snapshot and isn't on UserNobody14/tree-sitter-dart yet, so it can't ride along with a canonical-upstream submodule pointer. Labeled statements weren't supported on develop either, so this is not a regression; it can be re-introduced in a follow-up once the grammar change lands upstream. Also add changelog entries for PR #11678.
- Loading branch information
commit 15c9a6faf6802b24455466fef765277c2fe55b52
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Dart: typed metavariables (`$X as T`) and `metavariable-type`, | ||
| metavariable binding inside string interpolations, and function-definition | ||
| patterns that match Dart function definitions. |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Dart: improved parser fidelity for Dart 3 grammar features and routed | ||
| pattern parsing for statements beginning with `await`, `rethrow`, and other | ||
| statement keywords. Eliminates a large class of `PartialParsing` errors on | ||
| real-world pub.dev packages. |
This file contains hidden or 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
Submodule semgrep-dart
updated
from a28267 to 0202e4
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove this part of the diff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yosefAlsuhaibani : Done