Skip to content

Commit

Permalink
Use a different syntax for the named CST nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Dec 14, 2023
1 parent ffdf0eb commit e71b2c7
Show file tree
Hide file tree
Showing 448 changed files with 6,587 additions and 6,597 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Source: >
Errors: []

Tree:
- AsciiStringLiterals: # 0..11 '"foo" ''bar'''
- (item:) AsciiStringLiteral: '"foo"' # 0..5
- (item:) AsciiStringLiteral: "'bar'" # 6..11
- [AsciiStringLiterals]: # 0..11 '"foo" ''bar'''
- item [AsciiStringLiteral]: '"foo"' # 0..5
- item [AsciiStringLiteral]: "'bar'" # 6..11
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Source: >
Errors: []

Tree:
- AsciiStringLiterals: # 0..5 '"foo"'
- (item:) AsciiStringLiteral: '"foo"' # 0..5
- [AsciiStringLiterals]: # 0..5 '"foo"'
- item [AsciiStringLiteral]: '"foo"' # 0..5
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Errors: # 1 total
───╯
Tree:
- AsciiStringLiterals: # 0..9 '"foo"bar\n'
- (item:) AsciiStringLiteral: '"foo"' # 0..5
- SKIPPED: "bar\n" # 5..9
- [AsciiStringLiterals]: # 0..9 '"foo"bar\n'
- item [AsciiStringLiteral]: '"foo"' # 0..5
- [SKIPPED]: "bar\n" # 5..9
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Source: >
Errors: []

Tree:
- AssemblyStatement: # 0..39 'assembly "evmasm" ("memory-safe") {\n\n}\n'
- (assembly_keyword:) AssemblyKeyword: "assembly" # 0..8
- (label:) AsciiStringLiteral: '"evmasm"' # 9..17
- (flags:) AssemblyFlagsDeclaration: # 17..33 ' ("memory-safe")'
- (open_paren:) OpenParen: "(" # 18..19
- (flags:) AssemblyFlags: # 19..32 '"memory-safe"'
- (item:) AsciiStringLiteral: '"memory-safe"' # 19..32
- (close_paren:) CloseParen: ")" # 32..33
- (body:) YulBlock: # 33..39 " {\n\n}\n"
- (open_brace:) OpenBrace: "{" # 34..35
- (close_brace:) CloseBrace: "}" # 37..38
- [AssemblyStatement]: # 0..39 'assembly "evmasm" ("memory-safe") {\n\n}\n'
- assembly_keyword [AssemblyKeyword]: "assembly" # 0..8
- label [AsciiStringLiteral]: '"evmasm"' # 9..17
- flags [AssemblyFlagsDeclaration]: # 17..33 ' ("memory-safe")'
- open_paren [OpenParen]: "(" # 18..19
- flags [AssemblyFlags]: # 19..32 '"memory-safe"'
- item [AsciiStringLiteral]: '"memory-safe"' # 19..32
- close_paren [CloseParen]: ")" # 32..33
- body [YulBlock]: # 33..39 " {\n\n}\n"
- open_brace [OpenBrace]: "{" # 34..35
- close_brace [CloseBrace]: "}" # 37..38
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Errors: # 1 total
───╯
Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- Statements: # 1..12 " unchecked "
- Statement: # 1..12 " unchecked "
- ExpressionStatement: # 1..12 " unchecked "
- (expression:) Expression: # 1..11 " unchecked"
- (variant:) Identifier: "unchecked" # 2..11
- SKIPPED: "{ x = 1; } " # 12..23
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- [Statements]: # 1..12 " unchecked "
- [Statement]: # 1..12 " unchecked "
- [ExpressionStatement]: # 1..12 " unchecked "
- expression [Expression]: # 1..11 " unchecked"
- variant [Identifier]: "unchecked" # 2..11
- [SKIPPED]: "{ x = 1; } " # 12..23
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Errors: # 1 total
───╯
Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- SKIPPED: "unchecked { x = 1; } " # 2..23
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- [SKIPPED]: "unchecked { x = 1; } " # 2..23
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Errors: # 1 total
───╯
Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- SKIPPED: "unchecked { x = 1; } " # 2..23
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- [SKIPPED]: "unchecked { x = 1; } " # 2..23
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Errors: # 1 total
───╯
Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- SKIPPED: "unchecked { x = 1; } " # 2..23
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- [SKIPPED]: "unchecked { x = 1; } " # 2..23
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Errors: # 1 total
───╯
Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- SKIPPED: "unchecked { x = 1; } " # 2..23
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- [SKIPPED]: "unchecked { x = 1; } " # 2..23
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ Source: >
Errors: []

Tree:
- Block: # 0..24 "{ unchecked { x = 1; } }"
- (open_brace:) OpenBrace: "{" # 0..1
- (statements:) Statements: # 1..22 " unchecked { x = 1; }"
- (item:) Statement: # 1..22 " unchecked { x = 1; }"
- (variant:) UncheckedBlock: # 1..22 " unchecked { x = 1; }"
- (unchecked_keyword:) UncheckedKeyword: "unchecked" # 2..11
- (block:) Block: # 11..22 " { x = 1; }"
- (open_brace:) OpenBrace: "{" # 12..13
- (statements:) Statements: # 13..20 " x = 1;"
- (item:) Statement: # 13..20 " x = 1;"
- (variant:) ExpressionStatement: # 13..20 " x = 1;"
- (expression:) Expression: # 13..19 " x = 1"
- (variant:) AssignmentExpression: # 13..19 " x = 1"
- (left_operand:) Expression: # 13..15 " x"
- (variant:) Identifier: "x" # 14..15
- (operator:) Equal: "=" # 16..17
- (right_operand:) Expression: # 17..19 " 1"
- (variant:) DecimalNumberExpression: # 17..19 " 1"
- (literal:) DecimalLiteral: "1" # 18..19
- (semicolon:) Semicolon: ";" # 19..20
- (close_brace:) CloseBrace: "}" # 21..22
- (close_brace:) CloseBrace: "}" # 23..24
- [Block]: # 0..24 "{ unchecked { x = 1; } }"
- open_brace [OpenBrace]: "{" # 0..1
- statements [Statements]: # 1..22 " unchecked { x = 1; }"
- item [Statement]: # 1..22 " unchecked { x = 1; }"
- variant [UncheckedBlock]: # 1..22 " unchecked { x = 1; }"
- unchecked_keyword [UncheckedKeyword]: "unchecked" # 2..11
- block [Block]: # 11..22 " { x = 1; }"
- open_brace [OpenBrace]: "{" # 12..13
- statements [Statements]: # 13..20 " x = 1;"
- item [Statement]: # 13..20 " x = 1;"
- variant [ExpressionStatement]: # 13..20 " x = 1;"
- expression [Expression]: # 13..19 " x = 1"
- variant [AssignmentExpression]: # 13..19 " x = 1"
- left_operand [Expression]: # 13..15 " x"
- variant [Identifier]: "x" # 14..15
- operator [Equal]: "=" # 16..17
- right_operand [Expression]: # 17..19 " 1"
- variant [DecimalNumberExpression]: # 17..19 " 1"
- literal [DecimalLiteral]: "1" # 18..19
- semicolon [Semicolon]: ";" # 19..20
- close_brace [CloseBrace]: "}" # 21..22
- close_brace [CloseBrace]: "}" # 23..24
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Errors: # 1 total
───╯
Tree:
- BreakStatement: # 0..16 "break invalid ;\n"
- (break_keyword:) BreakKeyword: "break" # 0..5
- SKIPPED: "invalid " # 6..14
- (semicolon:) Semicolon: ";" # 14..15
- [BreakStatement]: # 0..16 "break invalid ;\n"
- break_keyword [BreakKeyword]: "break" # 0..5
- [SKIPPED]: "invalid " # 6..14
- semicolon [Semicolon]: ";" # 14..15
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Source: >
Errors: []

Tree:
- BreakStatement: # 0..8 "break ;\n"
- (break_keyword:) BreakKeyword: "break" # 0..5
- (semicolon:) Semicolon: ";" # 6..7
- [BreakStatement]: # 0..8 "break ;\n"
- break_keyword [BreakKeyword]: "break" # 0..5
- semicolon [Semicolon]: ";" # 6..7
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Source: >
Errors: []

Tree:
- ConditionalExpression: # 0..18 "foo ? true : false"
- (operand:) Expression: # 0..3 "foo"
- (variant:) Identifier: "foo" # 0..3
- (question_mark:) QuestionMark: "?" # 4..5
- (true_expression:) Expression: # 5..10 " true"
- (variant:) TrueKeyword: "true" # 6..10
- (colon:) Colon: ":" # 11..12
- (false_expression:) Expression: # 12..18 " false"
- (variant:) FalseKeyword: "false" # 13..18
- [ConditionalExpression]: # 0..18 "foo ? true : false"
- operand [Expression]: # 0..3 "foo"
- variant [Identifier]: "foo" # 0..3
- question_mark [QuestionMark]: "?" # 4..5
- true_expression [Expression]: # 5..10 " true"
- variant [TrueKeyword]: "true" # 6..10
- colon [Colon]: ":" # 11..12
- false_expression [Expression]: # 12..18 " false"
- variant [FalseKeyword]: "false" # 13..18
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ Source: >
Errors: []

Tree:
- ConditionalExpression: # 0..27 "(foo == bar) ? true : false"
- (operand:) Expression: # 0..12 "(foo == bar)"
- (variant:) TupleExpression: # 0..12 "(foo == bar)"
- (open_paren:) OpenParen: "(" # 0..1
- (items:) TupleValues: # 1..11 "foo == bar"
- (item:) TupleValue: # 1..11 "foo == bar"
- (expression:) Expression: # 1..11 "foo == bar"
- (variant:) EqualityExpression: # 1..11 "foo == bar"
- (left_operand:) Expression: # 1..4 "foo"
- (variant:) Identifier: "foo" # 1..4
- (operator:) EqualEqual: "==" # 5..7
- (right_operand:) Expression: # 7..11 " bar"
- (variant:) Identifier: "bar" # 8..11
- (close_paren:) CloseParen: ")" # 11..12
- (question_mark:) QuestionMark: "?" # 13..14
- (true_expression:) Expression: # 14..19 " true"
- (variant:) TrueKeyword: "true" # 15..19
- (colon:) Colon: ":" # 20..21
- (false_expression:) Expression: # 21..27 " false"
- (variant:) FalseKeyword: "false" # 22..27
- [ConditionalExpression]: # 0..27 "(foo == bar) ? true : false"
- operand [Expression]: # 0..12 "(foo == bar)"
- variant [TupleExpression]: # 0..12 "(foo == bar)"
- open_paren [OpenParen]: "(" # 0..1
- items [TupleValues]: # 1..11 "foo == bar"
- item [TupleValue]: # 1..11 "foo == bar"
- expression [Expression]: # 1..11 "foo == bar"
- variant [EqualityExpression]: # 1..11 "foo == bar"
- left_operand [Expression]: # 1..4 "foo"
- variant [Identifier]: "foo" # 1..4
- operator [EqualEqual]: "==" # 5..7
- right_operand [Expression]: # 7..11 " bar"
- variant [Identifier]: "bar" # 8..11
- close_paren [CloseParen]: ")" # 11..12
- question_mark [QuestionMark]: "?" # 13..14
- true_expression [Expression]: # 14..19 " true"
- variant [TrueKeyword]: "true" # 15..19
- colon [Colon]: ":" # 20..21
- false_expression [Expression]: # 21..27 " false"
- variant [FalseKeyword]: "false" # 22..27
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ Source: >
Errors: []

Tree:
- ConditionalExpression: # 0..23 "foo ? (a + b) : (c + d)"
- (operand:) Expression: # 0..3 "foo"
- (variant:) Identifier: "foo" # 0..3
- (question_mark:) QuestionMark: "?" # 4..5
- (true_expression:) Expression: # 5..13 " (a + b)"
- (variant:) TupleExpression: # 5..13 " (a + b)"
- (open_paren:) OpenParen: "(" # 6..7
- (items:) TupleValues: # 7..12 "a + b"
- (item:) TupleValue: # 7..12 "a + b"
- (expression:) Expression: # 7..12 "a + b"
- (variant:) AdditiveExpression: # 7..12 "a + b"
- (left_operand:) Expression: # 7..8 "a"
- (variant:) Identifier: "a" # 7..8
- (operator:) Plus: "+" # 9..10
- (right_operand:) Expression: # 10..12 " b"
- (variant:) Identifier: "b" # 11..12
- (close_paren:) CloseParen: ")" # 12..13
- (colon:) Colon: ":" # 14..15
- (false_expression:) Expression: # 15..23 " (c + d)"
- (variant:) TupleExpression: # 15..23 " (c + d)"
- (open_paren:) OpenParen: "(" # 16..17
- (items:) TupleValues: # 17..22 "c + d"
- (item:) TupleValue: # 17..22 "c + d"
- (expression:) Expression: # 17..22 "c + d"
- (variant:) AdditiveExpression: # 17..22 "c + d"
- (left_operand:) Expression: # 17..18 "c"
- (variant:) Identifier: "c" # 17..18
- (operator:) Plus: "+" # 19..20
- (right_operand:) Expression: # 20..22 " d"
- (variant:) Identifier: "d" # 21..22
- (close_paren:) CloseParen: ")" # 22..23
- [ConditionalExpression]: # 0..23 "foo ? (a + b) : (c + d)"
- operand [Expression]: # 0..3 "foo"
- variant [Identifier]: "foo" # 0..3
- question_mark [QuestionMark]: "?" # 4..5
- true_expression [Expression]: # 5..13 " (a + b)"
- variant [TupleExpression]: # 5..13 " (a + b)"
- open_paren [OpenParen]: "(" # 6..7
- items [TupleValues]: # 7..12 "a + b"
- item [TupleValue]: # 7..12 "a + b"
- expression [Expression]: # 7..12 "a + b"
- variant [AdditiveExpression]: # 7..12 "a + b"
- left_operand [Expression]: # 7..8 "a"
- variant [Identifier]: "a" # 7..8
- operator [Plus]: "+" # 9..10
- right_operand [Expression]: # 10..12 " b"
- variant [Identifier]: "b" # 11..12
- close_paren [CloseParen]: ")" # 12..13
- colon [Colon]: ":" # 14..15
- false_expression [Expression]: # 15..23 " (c + d)"
- variant [TupleExpression]: # 15..23 " (c + d)"
- open_paren [OpenParen]: "(" # 16..17
- items [TupleValues]: # 17..22 "c + d"
- item [TupleValue]: # 17..22 "c + d"
- expression [Expression]: # 17..22 "c + d"
- variant [AdditiveExpression]: # 17..22 "c + d"
- left_operand [Expression]: # 17..18 "c"
- variant [Identifier]: "c" # 17..18
- operator [Plus]: "+" # 19..20
- right_operand [Expression]: # 20..22 " d"
- variant [Identifier]: "d" # 21..22
- close_paren [CloseParen]: ")" # 22..23
Loading

0 comments on commit e71b2c7

Please sign in to comment.