Fix error propagation error in parsing. Semantic checker fix for compile result struct. Test cleanup
This commit is contained in:
@@ -21,7 +21,7 @@ Parse_State :: struct {
|
||||
child_allocator : Allocator;
|
||||
child_arena : Arena;
|
||||
|
||||
had_error : bool;
|
||||
// had_error : bool;
|
||||
|
||||
path : string;
|
||||
|
||||
@@ -792,6 +792,9 @@ argument_list :: (parse_state : *Parse_State) -> *AST_Node {
|
||||
|
||||
source_location.main_token = parse_state.current;
|
||||
|
||||
error_before := parse_state.result.had_error;
|
||||
parse_state.result.had_error = false;
|
||||
|
||||
while !check(parse_state, .TOKEN_RIGHTPAREN) {
|
||||
arg := expression(parse_state);
|
||||
if !node {
|
||||
@@ -808,6 +811,8 @@ argument_list :: (parse_state : *Parse_State) -> *AST_Node {
|
||||
}
|
||||
}
|
||||
|
||||
parse_state.result.had_error = error_before || parse_state.result.had_error;
|
||||
|
||||
consume(parse_state, .TOKEN_RIGHTPAREN, "Expect ')' after function call.");
|
||||
|
||||
if node {
|
||||
|
||||
Reference in New Issue
Block a user