mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
added unroll loop construct
This commit is contained in:
@@ -92,6 +92,7 @@ statement :
|
||||
| whileloop
|
||||
| untilloop
|
||||
| repeatloop
|
||||
| unrollloop
|
||||
| whenstmt
|
||||
| breakstmt
|
||||
| labeldef
|
||||
@@ -289,6 +290,8 @@ untilloop: 'do' (statement | statement_block) EOL? 'until' expression ;
|
||||
|
||||
repeatloop: 'repeat' expression? EOL? (statement | statement_block) ;
|
||||
|
||||
unrollloop: 'unroll' integerliteral? EOL? (statement | statement_block) ;
|
||||
|
||||
whenstmt: 'when' expression '{' EOL (when_choice | EOL) * '}' EOL? ;
|
||||
|
||||
when_choice: (expression_list | 'else' ) '->' (statement | statement_block ) ;
|
||||
|
||||
Reference in New Issue
Block a user