Skip to content

Commit ff69d94

Browse files
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 * format
1 parent 1a767d6 commit ff69d94

53 files changed

Lines changed: 4465 additions & 6050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{
2-
"cSpell.words": [
3-
"vuvoth"
4-
]
1+
{
2+
"cSpell.words": [
3+
"vuvoth"
4+
]
55
}

crates/lsp/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ path-absolutize = "3.1.1"
2727

2828
[profile]
2929
dev.debug = 2
30+
31+
[dev-dependencies]
32+
# for snapshot testing, yaml format
33+
insta = { version = "1.41.1", features = ["yaml"] }
34+
35+
[profile.dev.package]
36+
# compile slightly slower once, but use less memory, have faster diffs
37+
insta.opt-level = 3
38+
similar.opt-level = 3

0 commit comments

Comments
 (0)