allow for C99 declarations in for loop
This commit is contained in:
parent
91f63d1f49
commit
ca929b5ecd
@ -1138,6 +1138,25 @@ iteration_statement
|
||||
$$->list->push_back($6);
|
||||
$$->list->push_back($7);
|
||||
}
|
||||
| FOR LPAREN declaration expression_statement RPAREN statement {
|
||||
$$ = new Node(NODE_TYPE_LIST);
|
||||
$$->list->push_back($1);
|
||||
$$->list->push_back($2);
|
||||
$$->list->push_back($3);
|
||||
$$->list->push_back($4);
|
||||
$$->list->push_back($5);
|
||||
$$->list->push_back($6);
|
||||
}
|
||||
| FOR LPAREN declaration expression_statement expression RPAREN statement {
|
||||
$$ = new Node(NODE_TYPE_LIST);
|
||||
$$->list->push_back($1);
|
||||
$$->list->push_back($2);
|
||||
$$->list->push_back($3);
|
||||
$$->list->push_back($4);
|
||||
$$->list->push_back($5);
|
||||
$$->list->push_back($6);
|
||||
$$->list->push_back($7);
|
||||
}
|
||||
;
|
||||
|
||||
jump_statement
|
||||
|
Loading…
x
Reference in New Issue
Block a user