mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 19:30:06 +00:00
Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc
This commit is contained in:
@@ -107,6 +107,7 @@ Token_Kind :: enum u32 {
|
||||
Comma, // ,
|
||||
Ellipsis, // ..
|
||||
Range_Half, // ..<
|
||||
Range_Full, // ..=
|
||||
Back_Slash, // \
|
||||
B_Operator_End,
|
||||
|
||||
@@ -233,6 +234,7 @@ tokens := [Token_Kind.COUNT]string {
|
||||
",",
|
||||
"..",
|
||||
"..<",
|
||||
"..=",
|
||||
"\\",
|
||||
"",
|
||||
|
||||
|
||||
@@ -623,6 +623,9 @@ scan :: proc(t: ^Tokenizer) -> Token {
|
||||
if t.ch == '<' {
|
||||
advance_rune(t);
|
||||
kind = .Range_Half;
|
||||
} else if t.ch == '=' {
|
||||
advance_rune(t);
|
||||
kind = .Range_Full;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user