mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
support for do ..while
This commit is contained in:
parent
90a3461a27
commit
69315e9b54
@ -1278,7 +1278,7 @@ iteration_statement:
|
|||||||
-> foreach(type = { $local_variable_type.st }, loopid = { $identifier.st }, fromexp = { $expression.st },
|
-> foreach(type = { $local_variable_type.st }, loopid = { $identifier.st }, fromexp = { $expression.st },
|
||||||
block = { $embedded_statement.st }, blockindent = { $embedded_statement.indent });
|
block = { $embedded_statement.st }, blockindent = { $embedded_statement.indent });
|
||||||
do_statement:
|
do_statement:
|
||||||
'do' embedded_statement 'while' '(' boolean_expression ')' ';' ;
|
'do' embedded_statement 'while' '(' boolean_expression ')' ';' -> do(cond = { $boolean_expression.st }, block = { $embedded_statement.st }, blockindent = { $embedded_statement.indent });
|
||||||
for_initializer:
|
for_initializer:
|
||||||
(local_variable_declaration) => local_variable_declaration -> { $local_variable_declaration.st }
|
(local_variable_declaration) => local_variable_declaration -> { $local_variable_declaration.st }
|
||||||
| statement_expression_list -> { $statement_expression_list.st }
|
| statement_expression_list -> { $statement_expression_list.st }
|
||||||
|
@ -172,6 +172,13 @@ while (<cond>)
|
|||||||
<block(statements = block)>
|
<block(statements = block)>
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
do(comments,cond,block) ::= <<
|
||||||
|
<comments; separator="\n">
|
||||||
|
do
|
||||||
|
<block(statements = block)>
|
||||||
|
while (<cond>);
|
||||||
|
>>
|
||||||
|
|
||||||
for(comments,init,cond,iter,block,blockindent) ::= <<
|
for(comments,init,cond,iter,block,blockindent) ::= <<
|
||||||
<comments; separator="\n">
|
<comments; separator="\n">
|
||||||
for (<init>;<cond>;<iter>)
|
for (<init>;<cond>;<iter>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user