Commit ff69d94
authored
refactor declaration grammar (#65)
* skip trivial first tokens in parsing
* remove comment in input test
* manage out-of-bound case, update input test
* update input test
* update input test
* make test programs private
* remove comments in syntax tests
* format
* make Pragma optional, remove ROOT
* rename close() params, use advance() in eat(), fix typo scope
* parse params using list_identity
* return Option in token_value() and position_of()
* do not allow <--, <== in var declaration
* make public signal optional in main component
* fix format before merge
* remove empty test
* replace expect by eat in block
* add scope parsing test
* fix space in scope parsing test
* update snapshot test for syntax
* refactor syntax test
* update input tests with snapshot
* change param type in find signal into str
* add snapshot guild
* add some combine arithmetic operators
* error report in expect and expect_any
* update snapshot for combine operators
* update snapshot test
* fix wrap trivial tokens before open a tree
* update template happy test
* add operators into token kinds
* add operators test
* re-priority token kinds
* fix clippy check
* fix clippy check
* rebase add-token-kinds
* fix clippy check
* fix clippy
* remove duplicate declaration in grammar tests
* add missing signal assign tokens
* fix grammar of for statement
* add statements test
* fix declaration, support matrix
* fix format
* refactor declaration
* use list identity parser in tuple
* fix right curly count in block
* extract function params
* add declaration test
* remove duplicate else in comment
* replace eat by expect for curly in block
* comment statement in declaration test
* fix format
* merge master after PR #68
* add snapshot for goto_definition test
* allow \r in EndLine token
* add ExpressionAtom token
* group identifer in var, signal, component declaration
* format1 parent 1a767d6 commit ff69d94
53 files changed
Lines changed: 4465 additions & 6050 deletions
File tree
- .vscode
- crates
- lsp
- src
- handler
- snapshots
- test_files/handler
- parser/src
- grammar
- snapshots
- syntax/src
- abstract_syntax_tree
- snapshots
- test_files/happy
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments