Compare commits
2 Commits
4bc44f6d43
...
895fe86c09
Author | SHA1 | Date |
---|---|---|
Danila Fedorin | 895fe86c09 | |
Danila Fedorin | 54f89e5dfb |
13
parser.y
13
parser.y
|
@ -107,11 +107,16 @@ stmts
|
|||
| stmt { $$ = $1; }
|
||||
;
|
||||
|
||||
newlines
|
||||
: newlines NEWLINE
|
||||
|
|
||||
;
|
||||
|
||||
stmt
|
||||
: expr NEWLINE { $$ = concatenate($1, ";"); }
|
||||
| if { $$ = $1; }
|
||||
| while { $$ = $1; }
|
||||
| BREAK NEWLINE { $$ = new std::string("break;"); }
|
||||
: expr NEWLINE newlines { $$ = concatenate($1, ";"); }
|
||||
| if newlines { $$ = $1; }
|
||||
| while newlines { $$ = $1; }
|
||||
| BREAK newlines { $$ = new std::string("break;"); }
|
||||
;
|
||||
|
||||
expr
|
||||
|
|
Loading…
Reference in New Issue