Fix error propagation error in parsing. Semantic checker fix for compile result struct. Test cleanup

This commit is contained in:
2025-08-18 07:11:41 +02:00
parent c36712b3ed
commit b7e34a22b2
11 changed files with 76 additions and 99 deletions

View File

@@ -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 {