diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-22 17:09:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-22 17:09:40 +0100 |
| commit | 0c5fa2cdd506b7e7d445d32171c9660be352ae7a (patch) | |
| tree | 94bacb34471136cfcf13dbbf6fa510363c0b0d40 | |
| parent | 36cb1f868ba0f88e11608c7d40fbc6709493f92b (diff) | |
Fix build.bat
| -rw-r--r-- | build.bat | 8 | ||||
| -rw-r--r-- | core/odin/parser/parser.odin | 8 |
2 files changed, 7 insertions, 9 deletions
@@ -68,12 +68,10 @@ set linker_settings=%libs% %linker_flags% del *.pdb > NUL 2> NUL del *.ilk > NUL 2> NUL -rem cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% -cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% ^ - && odin run examples/demo -vet +cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% -rem if %errorlevel% neq 0 goto end_of_build -rem if %release_mode% EQU 0 odin check examples/all +if %errorlevel% neq 0 goto end_of_build +if %release_mode% EQU 0 odin check examples/all del *.obj > NUL 2> NUL diff --git a/core/odin/parser/parser.odin b/core/odin/parser/parser.odin index 5dda2fc27..b08f9d479 100644 --- a/core/odin/parser/parser.odin +++ b/core/odin/parser/parser.odin @@ -850,8 +850,8 @@ parse_for_stmt :: proc(p: ^Parser) -> ^ast.Stmt { cond = nil; - if f.curr_tok.kind == .Open_Brace || f.curr_tok.kind == .Do { - error(p, f.curr_tok.pos, "Expected ';', followed by a condition expression and post statement, got %s", token.tokens[f.curr_tok.kind]); + if p.curr_tok.kind == .Open_Brace || p.curr_tok.kind == .Do { + error(p, p.curr_tok.pos, "Expected ';', followed by a condition expression and post statement, got %s", tokenizer.tokens[p.curr_tok.kind]); } else { if p.curr_tok.kind != .Semicolon { cond = parse_simple_stmt(p, nil); @@ -2448,12 +2448,12 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr { case .Open_Bracket: open := expect_token(p, .Open_Bracket); count: ^ast.Expr; - switch p.curr_tok.kind { + #partial switch p.curr_tok.kind { case .Pointer: tok := expect_token(p, .Pointer); close := expect_token(p, .Close_Bracket); elem := parse_type(p); - t := ast.new(ast.Multi_Pointer_Type, open.pos, elem.end_pos); + t := ast.new(ast.Multi_Pointer_Type, open.pos, elem.end); t.open = open.pos; t.pointer = tok.pos; t.close = close.pos; |