Fix if statements.
This commit is contained in:
parent
3f3df59761
commit
4bc89d5ca3
@ -349,27 +349,15 @@ ExpressionStatement:
|
|||||||
- expression
|
- expression
|
||||||
IfStatement:
|
IfStatement:
|
||||||
children:
|
children:
|
||||||
- if_kw:
|
- if_clause
|
||||||
rule: If
|
|
||||||
skip: true
|
|
||||||
- expression
|
|
||||||
- then_kw:
|
|
||||||
rule: Then
|
|
||||||
skip: true
|
|
||||||
- statements:
|
|
||||||
rule: Statement
|
|
||||||
vec: true
|
|
||||||
- end_kw:
|
|
||||||
rule: End
|
|
||||||
skip: true
|
|
||||||
IfElseStatement:
|
|
||||||
children:
|
|
||||||
- if_else_first
|
|
||||||
- if_else_ifs:
|
- if_else_ifs:
|
||||||
rule: IfElseIf
|
rule: IfElseIf
|
||||||
vec: true
|
vec: true
|
||||||
- if_else_else
|
- if_else
|
||||||
IfElseFirst:
|
- end_kw:
|
||||||
|
rule: End
|
||||||
|
skip: true
|
||||||
|
IfClause:
|
||||||
children:
|
children:
|
||||||
- if_kw:
|
- if_kw:
|
||||||
rule: If
|
rule: If
|
||||||
@ -386,17 +374,8 @@ IfElseIf:
|
|||||||
- else_kw:
|
- else_kw:
|
||||||
rule: Else
|
rule: Else
|
||||||
skip: true
|
skip: true
|
||||||
- if_kw:
|
- if_clause
|
||||||
rule: If
|
IfElse:
|
||||||
skip: true
|
|
||||||
- expression
|
|
||||||
- then_kw:
|
|
||||||
rule: Then
|
|
||||||
skip: true
|
|
||||||
- statements:
|
|
||||||
rule: Statement
|
|
||||||
vec: true
|
|
||||||
IfElseElse:
|
|
||||||
children:
|
children:
|
||||||
- else_kw:
|
- else_kw:
|
||||||
rule: Else
|
rule: Else
|
||||||
@ -404,9 +383,6 @@ IfElseElse:
|
|||||||
- statements:
|
- statements:
|
||||||
rule: Statement
|
rule: Statement
|
||||||
vec: true
|
vec: true
|
||||||
- end_kw:
|
|
||||||
rule: End
|
|
||||||
skip: true
|
|
||||||
WhileStatement:
|
WhileStatement:
|
||||||
children:
|
children:
|
||||||
- while_kw:
|
- while_kw:
|
||||||
|
@ -546,7 +546,6 @@ Statement = {
|
|||||||
| AssignmentStatement
|
| AssignmentStatement
|
||||||
| ExpressionStatement
|
| ExpressionStatement
|
||||||
| UseStatement
|
| UseStatement
|
||||||
| IfElseStatement
|
|
||||||
| IfStatement
|
| IfStatement
|
||||||
| WhileStatement
|
| WhileStatement
|
||||||
| ForStatement
|
| ForStatement
|
||||||
@ -571,20 +570,13 @@ ExpressionStatement = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IfStatement = {
|
IfStatement = {
|
||||||
If
|
IfClause
|
||||||
~ Expression
|
~ IfElseIf*
|
||||||
~ Then
|
~ IfElse?
|
||||||
~ Statement*
|
|
||||||
~ End
|
~ End
|
||||||
}
|
}
|
||||||
|
|
||||||
IfElseStatement = {
|
IfClause = {
|
||||||
IfElseFirst
|
|
||||||
~ IfElseIf*
|
|
||||||
~ IfElseElse
|
|
||||||
}
|
|
||||||
|
|
||||||
IfElseFirst = {
|
|
||||||
If
|
If
|
||||||
~ Expression
|
~ Expression
|
||||||
~ Then
|
~ Then
|
||||||
@ -593,16 +585,12 @@ IfElseFirst = {
|
|||||||
|
|
||||||
IfElseIf = {
|
IfElseIf = {
|
||||||
Else
|
Else
|
||||||
~ If
|
~ IfClause
|
||||||
~ Expression
|
|
||||||
~ Then
|
|
||||||
~ Statement*
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IfElseElse = {
|
IfElse = {
|
||||||
Else
|
Else
|
||||||
~ Statement*
|
~ Statement*
|
||||||
~ End
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WhileStatement = {
|
WhileStatement = {
|
||||||
|
Loading…
Reference in New Issue
Block a user