Skip to content

Commit

Permalink
chore: refactor parser.rs (#6896)
Browse files Browse the repository at this point in the history
Breaking up one of the larger functions into some smaller pieces to make it a bit more manageable

## Checklist

- [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [ ] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
Chriscbr committed Jul 12, 2024
1 parent da59b52 commit fc29899
Show file tree
Hide file tree
Showing 4 changed files with 400 additions and 352 deletions.
2 changes: 1 addition & 1 deletion libs/tree-sitter-wing/grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PREC = {
module.exports = grammar({
name: "wing",

extras: ($) => [$.comment, $.doc, /[\s\p{Zs}\uFEFF\u2060\u200B]/],
extras: ($) => [$.comment, $.doc, /[\s\p{Zs}\uFEFF\u2060\u200B]/u],

word: ($) => $.identifier,

Expand Down
3 changes: 2 additions & 1 deletion libs/tree-sitter-wing/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"compilerOptions": {
"checkJs": true,
"module": "CommonJS",
"lib": ["ES2020"]
"lib": ["ES2020"],
"target": "ES2020"
},
"include": ["grammar.js", "tree-sitter-dsl.d.ts"]
}
3 changes: 2 additions & 1 deletion libs/tree-sitter-wing/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc29899

Please sign in to comment.