Restructure
This commit is contained in:
@@ -207,8 +207,11 @@ parse_block(){
|
||||
if(token_match_keyword(keyword_return)){
|
||||
Ast_Expr *expr = 0;
|
||||
if(!token_is_scope()) expr = parse_expr();
|
||||
Ast_Return *return_stmt = ast_return(token, expr);
|
||||
stmts.add(return_stmt);
|
||||
stmts.add(ast_return(token, expr));
|
||||
}
|
||||
|
||||
else if(token_match_keyword(keyword_pass)){
|
||||
stmts.add(ast_pass(token));
|
||||
}
|
||||
|
||||
else if(token_match_keyword(keyword_for)){
|
||||
@@ -225,7 +228,8 @@ parse_block(){
|
||||
}
|
||||
}
|
||||
|
||||
stmts.add(ast_for(token, actual_init, cond, iter, parse_block()));
|
||||
Ast_Block *for_block = parse_block();
|
||||
stmts.add(ast_for(token, actual_init, cond, iter, for_block));
|
||||
}
|
||||
|
||||
else if(token_match_keyword(keyword_if)){
|
||||
|
||||
Reference in New Issue
Block a user