This commit is contained in:
gingerBill
2022-08-14 21:50:21 +01:00
parent 7973f7e750
commit 81799f7f78
+2 -6
View File
@@ -4,6 +4,7 @@ import "core:odin/ast"
import "core:odin/tokenizer" import "core:odin/tokenizer"
import "core:fmt" import "core:fmt"
import "core:reflect"
Warning_Handler :: #type proc(pos: tokenizer.Pos, fmt: string, args: ..any) Warning_Handler :: #type proc(pos: tokenizer.Pos, fmt: string, args: ..any)
Error_Handler :: #type proc(pos: tokenizer.Pos, fmt: string, args: ..any) Error_Handler :: #type proc(pos: tokenizer.Pos, fmt: string, args: ..any)
@@ -245,12 +246,7 @@ peek_token :: proc(p: ^Parser, lookahead := 0) -> (tok: tokenizer.Token) {
return return
} }
skip_possible_newline :: proc(p: ^Parser) -> bool { skip_possible_newline :: proc(p: ^Parser) -> bool {
if .Optional_Semicolons not_in p.flags { if tokenizer.is_newline(p.curr_tok) {
return false
}
prev := p.curr_tok
if tokenizer.is_newline(prev) {
advance_token(p) advance_token(p)
return true return true
} }