Fix '>>' operand being tokenized correctly and switch statement with bare semicolon.
This commit is contained in:
1 parent
70dff11b29
commit
a2a7647c90
2 files changed
+2
-2
No files matched your search
@@ -786,7 +786,7 @@ parse_control_statement_semicolon_separator :: proc(p: ^Parser) -> bool {
|
|||||||
if tok.kind != .Open_Brace {
|
if tok.kind != .Open_Brace {
|
||||||
return allow_token(p, .Semicolon)
|
return allow_token(p, .Semicolon)
|
||||||
}
|
}
|
||||||
if tok.text == ";" {
|
if p.curr_tok.text == ";" {
|
||||||
return allow_token(p, .Semicolon)
|
return allow_token(p, .Semicolon)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -666,7 +666,7 @@ scan :: proc(t: ^Tokenizer) -> Token {
|
|||||||
case '=':
|
case '=':
|
||||||
advance_rune(t)
|
advance_rune(t)
|
||||||
kind = .Gt_Eq
|
kind = .Gt_Eq
|
||||||
case '<':
|
case '>':
|
||||||
advance_rune(t)
|
advance_rune(t)
|
||||||
kind = .Shr
|
kind = .Shr
|
||||||
if t.ch == '=' {
|
if t.ch == '=' {
|
||||||
|
|||||||
Reference in new issue
Block a user