Fix compile errors when compiling for msvc
This commit is contained in:
@@ -35,10 +35,17 @@ token_get(S64 i = 0){
|
||||
return result;
|
||||
}
|
||||
|
||||
function Token *
|
||||
token_is_scope(){
|
||||
Token *token = token_get();
|
||||
if(lex_is_scope(token)) return token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function Token *
|
||||
token_next(){
|
||||
Token *token = token_get();
|
||||
if(token_is_scope(token)) pctx->indent = token->indent;
|
||||
if(lex_is_scope(token)) pctx->indent = token->indent;
|
||||
pctx->token_iter++;
|
||||
return token;
|
||||
}
|
||||
@@ -172,7 +179,7 @@ parse_block(){
|
||||
Token *token = token_get();
|
||||
if(token_match_keyword(keyword_return)){
|
||||
AST_NEW(Return, AST_RETURN, token);
|
||||
if(!token_is_scope(token_get())) result->expr = parse_expr();
|
||||
if(!token_is_scope()) result->expr = parse_expr();
|
||||
stmts.add(result);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user