Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"vuvoth"
]
}
Empty file added crates/parser/src/utils.rs
Empty file.
4 changes: 2 additions & 2 deletions crates/syntax/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod abstract_syntax_tree;
pub mod syntax;
pub mod syntax_node;

mod test_programs;
mod utils;
mod view_syntax;

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
source: crates/syntax/src/syntax.rs
expression: "crate::view_syntax::view_ast(&syntax)"
---
Pragma 0..20
| Pragma 0..6
| | Pragma 0..6 "pragma"
| WhiteSpace 6..7
| | WhiteSpace 6..7
| | | WhiteSpace 6..7 " "
| Circom 7..13
| | Circom 7..13 "circom"
| WhiteSpace 13..14
| | WhiteSpace 13..14
| | | WhiteSpace 13..14 " "
| Version 14..19
| | Version 14..19 "2.0.0"
| Semicolon 19..20
| | Semicolon 19..20 ";"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
source: crates/syntax/src/syntax.rs
expression: "crate::view_syntax::view_ast(&syntax)"
---
Pragma 0..20
| Pragma 0..6
| | Pragma 0..6 "pragma"
| WhiteSpace 6..7
| | WhiteSpace 6..7
| | | WhiteSpace 6..7 " "
| Circom 7..13
| | Circom 7..13 "circom"
| WhiteSpace 13..14
| | WhiteSpace 13..14
| | | WhiteSpace 13..14 " "
| Version 14..19
| | Version 14..19 "2.0.0"
| Semicolon 19..20
| | Semicolon 19..20 ";"
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
source: crates/syntax/src/syntax.rs
expression: statements
---
- "signal input in[N];"
- "signal output out;"
- "component comp[N-1];"
- "for(var i = 0; i < N-1; i++){\n comp[i] = Multiplier2();\n }"
- "[expect Semicolon but got Identifier"
- Nexpect Semicolon but got RBracket
- "];"
- "[expect Semicolon but got Identifier"
- Nexpect Semicolon but got Sub
- "-1expect Semicolon but got RBracket"
- "];"
- for(var i = 0; i < N-1; iexpect RParen but got UnitInc++)expect Semicolon but got LCurly
- "{\n comp[i] = Multiplier2(expect Identifier but got RParen);\n }"
- "comp[0].in1 <== in[0];"
- "comp[0].in2 <== in[1];"
- "for(var i = 0; i < N-2; i++){\n comp[i+1].in1 <== comp[i].out;\n comp[i+1].in2 <== in[i+2];\n\n }"
- "out <== comp[N-2].out;"
- for(var i = 0; i < N-2; iexpect RParen but got UnitInc++)expect Semicolon but got LCurly
- "{\n comp[i+1].in1 <== comp[i].out;\n comp[i+1].in2 <== in[i+2];\n\n }"
- "out <== comp[N-2].out;"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
source: crates/syntax/src/syntax.rs
expression: statements
---
- "signal input in[N];"
- "signal output out;"
- "component comp[N-1];"
- "for(var i = 0; i < N-1; i++){\n comp[i] = Multiplier2();\n }"
- "[expect Semicolon but got Identifier"
- Nexpect Semicolon but got RBracket
- "];"
- "[expect Semicolon but got Identifier"
- Nexpect Semicolon but got Sub
- "-1expect Semicolon but got RBracket"
- "];"
- for(var i = 0; i < N-1; iexpect RParen but got UnitInc++)expect Semicolon but got LCurly
- "{\n comp[i] = Multiplier2(expect Identifier but got RParen);\n }"
Loading