Update core:odin/* for or_else and or_return

This commit is contained in:
gingerBill
2021-08-15 19:05:55 +01:00
parent 3e2788afdc
commit 4e1c9b71f4
7 changed files with 105 additions and 77 deletions
+8 -4
View File
@@ -144,10 +144,12 @@ Token_Kind :: enum u32 {
Transmute, // transmute
Distinct, // distinct
Using, // using
Context, // context
Or_Else, // or_else
Or_Return, // or_return
Asm, // asm
Inline, // inline
No_Inline, // no_inline
Context, // context
Asm, // asm
B_Keyword_End,
COUNT,
@@ -272,10 +274,12 @@ tokens := [Token_Kind.COUNT]string {
"transmute",
"distinct",
"using",
"context",
"or_else",
"or_return",
"asm",
"inline",
"no_inline",
"context",
"asm",
"",
};
+1 -1
View File
@@ -724,7 +724,7 @@ scan :: proc(t: ^Tokenizer) -> Token {
case .Ident, .Context, .Typeid, .Break, .Continue, .Fallthrough, .Return,
.Integer, .Float, .Imag, .Rune, .String, .Undef,
.Question, .Pointer, .Close_Paren, .Close_Bracket, .Close_Brace,
.Increment, .Decrement:
.Increment, .Decrement, .Or_Return:
/*fallthrough*/
t.insert_semicolon = true;
case: