mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix #1950
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user