Skip to content

Commit 20ad6ff

Browse files
authored
[v2] Node Checker for the new (v2) AST (#1501)
Added a node checker for the new AST (#1493), it defines a trait to be implemented over the new nodes. An important note, I use V1 nodes rather than a cursor since it's easier to track what I've seen and what I haven't seen. I found it difficult with a cursor to keep track of the children of a given node that had been processed already, and to traverse them in an arbitrary order. Since this comparison mechanism is temporary I think this solution is ok, but it does mean all the offset calculation is being done again.
1 parent cbdcf27 commit 20ad6ff

File tree

7 files changed

+26619
-0
lines changed

7 files changed

+26619
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/solidity-v2/outputs/cargo/parser/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ categories = ["compilers", "parsing", "parser-implementations"]
2222
logos = { workspace = true }
2323
semver = { workspace = true }
2424
slang_solidity = { workspace = true, features = ["__private_ariadne_errors"] }
25+
slang_solidity_v2_cst = { workspace = true }
2526
slang_solidity_v2_common = { workspace = true }
2627
strum_macros = { workspace = true }
2728

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![recursion_limit = "1024"] // for evaluating the 'logos' macro during build time
22

33
mod lexer;
4+
mod parser;
45

56
pub use lexer::temp_sourcify;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod temp_cst_output;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[path = "node_checker.generated.rs"]
2+
pub mod node_checker;

0 commit comments

Comments
 (0)