Lexer is not collecting hanging new lines

This commit is contained in:
Krzosa Karol
2022-05-24 22:13:53 +02:00
parent e032fefd07
commit 52910d5606
3 changed files with 19 additions and 14 deletions

View File

@@ -165,16 +165,16 @@ parse_optional_type(){
return result;
}
/*
function Ast_Block *
parse_block(){
Ast_Block *result = 0;
if(token_match(TK_NewScope)){
}
return result;
}
*/
// function Ast_Block *
// parse_block(){
// Ast_Block *result = 0;
// if(token_match(TK_NewScope)){
// }
// return result;
// }
function Ast_Lambda *
parse_lambda(Token *token, B32 is_typespec = false){ // @Todo(Krzosa): is_typespec is not used currently
@@ -197,8 +197,9 @@ parse_lambda(Token *token, B32 is_typespec = false){ // @Todo(Krzosa): is_typesp
}
token_expect(TK_CloseParen);
//Ast_Block *block = parse_block();
Ast_Lambda *result = ast_lambda(token, params, parse_optional_type());
Ast_Typespec *ret = parse_optional_type();
Ast_Block *block = 0;
Ast_Lambda *result = ast_lambda(token, params, ret, block);
return result;
}