Continue syntax overhaul
This commit is contained in:
parent
dbe7991fc6
commit
405a2dc86c
@ -93,6 +93,8 @@ else if 4 == 9
|
||||
(expression
|
||||
(value
|
||||
(string))))
|
||||
(statement
|
||||
(if_else
|
||||
(expression
|
||||
(logic
|
||||
(expression
|
||||
@ -105,7 +107,7 @@ else if 4 == 9
|
||||
(statement
|
||||
(expression
|
||||
(value
|
||||
(string))))))))
|
||||
(string))))))))))
|
||||
|
||||
==================
|
||||
If Else Else If Else
|
||||
@ -121,7 +123,6 @@ else "42"
|
||||
|
||||
---
|
||||
|
||||
|
||||
(root
|
||||
(item
|
||||
(statement
|
||||
@ -133,6 +134,8 @@ else "42"
|
||||
(expression
|
||||
(value
|
||||
(string))))
|
||||
(statement
|
||||
(if_else
|
||||
(expression
|
||||
(value
|
||||
(boolean)))
|
||||
@ -140,6 +143,8 @@ else "42"
|
||||
(expression
|
||||
(value
|
||||
(string))))
|
||||
(statement
|
||||
(if_else
|
||||
(expression
|
||||
(logic
|
||||
(expression
|
||||
@ -162,4 +167,4 @@ else "42"
|
||||
(statement
|
||||
(expression
|
||||
(value
|
||||
(string))))))))
|
||||
(string))))))))))))
|
||||
|
@ -151,12 +151,6 @@ module.exports = grammar({
|
||||
$.expression,
|
||||
'then',
|
||||
$.statement,
|
||||
repeat(seq(
|
||||
'else if',
|
||||
$.expression,
|
||||
'then',
|
||||
$.statement,
|
||||
)),
|
||||
optional(seq(
|
||||
'else',
|
||||
$.statement,
|
||||
|
@ -647,30 +647,6 @@
|
||||
"type": "SYMBOL",
|
||||
"name": "statement"
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "else if"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "then"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "statement"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
|
@ -532,10 +532,6 @@
|
||||
"type": "else",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "else if",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "false",
|
||||
"named": false
|
||||
|
11754
src/parser.c
11754
src/parser.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user