parser add assigment statement
This commit is contained in:
parent
b11adcf907
commit
f81a812f59
@ -215,7 +215,7 @@ localvariabledeclaration : type variabledeclarators { map LocalVariableDeclarati
|
|||||||
|
|
||||||
statementwithouttrailingsubstatement : block { [$1] }
|
statementwithouttrailingsubstatement : block { [$1] }
|
||||||
| emptystatement { [] }
|
| emptystatement { [] }
|
||||||
-- | expressionstatement { }
|
| expressionstatement { [$1] }
|
||||||
| returnstatement { [$1] }
|
| returnstatement { [$1] }
|
||||||
|
|
||||||
ifthenstatement : IF LBRACE expression RBRACE statement { If $3 (Block $5) Nothing }
|
ifthenstatement : IF LBRACE expression RBRACE statement { If $3 (Block $5) Nothing }
|
||||||
@ -229,7 +229,7 @@ assignmentexpression : conditionalexpression { $1 }
|
|||||||
|
|
||||||
emptystatement : SEMICOLON { Block [] }
|
emptystatement : SEMICOLON { Block [] }
|
||||||
|
|
||||||
expressionstatement : statementexpression SEMICOLON { }
|
expressionstatement : statementexpression SEMICOLON { StatementExpressionStatement $1 }
|
||||||
|
|
||||||
returnstatement : RETURN SEMICOLON { Return Nothing }
|
returnstatement : RETURN SEMICOLON { Return Nothing }
|
||||||
| RETURN expression SEMICOLON { Return $ Just $2 }
|
| RETURN expression SEMICOLON { Return $ Just $2 }
|
||||||
@ -248,13 +248,13 @@ assignment : lefthandside assignmentoperator assignmentexpression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
statementexpression : assignment { }
|
statementexpression : assignment { $1 }
|
||||||
| preincrementexpression { }
|
-- | preincrementexpression { }
|
||||||
| predecrementexpression { }
|
-- | predecrementexpression { }
|
||||||
| postincrementexpression { }
|
-- | postincrementexpression { }
|
||||||
| postdecrementexpression { }
|
-- | postdecrementexpression { }
|
||||||
| methodinvocation { }
|
-- | methodinvocation { }
|
||||||
| classinstancecreationexpression { }
|
-- | classinstancecreationexpression { }
|
||||||
|
|
||||||
ifthenelsestatementnoshortif :IF LBRACE expression RBRACE statementnoshortif
|
ifthenelsestatementnoshortif :IF LBRACE expression RBRACE statementnoshortif
|
||||||
ELSE statementnoshortif { }
|
ELSE statementnoshortif { }
|
||||||
|
Loading…
Reference in New Issue
Block a user