Skip to content

Commit

Permalink
update the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
resolritter committed Apr 24, 2023
1 parent 162d737 commit cb91ae8
Show file tree
Hide file tree
Showing 3 changed files with 92,600 additions and 105,789 deletions.
140 changes: 65 additions & 75 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1912,43 +1912,13 @@
"type": "SYMBOL",
"name": "_PrimaryTypeExpr"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_PrimaryTypeExpr"
},
{
"type": "SYMBOL",
"name": "FnCallArguments"
}
]
},
{
"type": "FIELD",
"name": "variable_type_function",
"content": {
"type": "SYMBOL",
"name": "IDENTIFIER"
}
},
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "function_call",
"content": {
"type": "SYMBOL",
"name": "IDENTIFIER"
}
},
{
"type": "SYMBOL",
"name": "FnCallArguments"
}
]
}
]
},
Expand All @@ -1962,21 +1932,12 @@
"name": "SuffixOp"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "SuffixOp"
},
{
"type": "SYMBOL",
"name": "FnCallArguments"
}
]
"type": "SYMBOL",
"name": "FieldOrFnCall"
},
{
"type": "SYMBOL",
"name": "FieldOrFnCall"
"name": "FnCallArguments"
}
]
}
Expand Down Expand Up @@ -4141,6 +4102,58 @@
}
]
},
"_SentinelTerminatedExpr": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "IDENTIFIER"
},
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "_Expr"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_Expr"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "_Expr"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
]
},
"SuffixOp": {
"type": "CHOICE",
"members": [
Expand Down Expand Up @@ -4170,28 +4183,7 @@
"members": [
{
"type": "SYMBOL",
"name": "_Expr"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "_Expr"
}
]
"name": "_SentinelTerminatedExpr"
},
{
"type": "BLANK"
Expand Down Expand Up @@ -5491,17 +5483,15 @@
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "{"
},
{
"type": "STRING",
"value": "}"
}
]
"type": "STRING",
"value": "{"
}
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "STRING",
"value": "}"
}
}
]
Expand Down
14 changes: 4 additions & 10 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -2456,16 +2456,6 @@
}
]
},
"function_call": {
"multiple": false,
"required": false,
"types": [
{
"type": "IDENTIFIER",
"named": true
}
]
},
"variable_type_function": {
"multiple": false,
"required": false,
Expand Down Expand Up @@ -2596,6 +2586,10 @@
"type": "ErrorUnionExpr",
"named": true
},
{
"type": "IDENTIFIER",
"named": true
},
{
"type": "IfExpr",
"named": true
Expand Down
Loading

0 comments on commit cb91ae8

Please sign in to comment.