diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-04-30 15:09:36 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-04-30 15:09:36 +0100 |
| commit | 784f3ecf7e427c1d948541f62253d6d2eab9e70d (patch) | |
| tree | dd1dba8ff48b3b31944773fc341de8832b0fd582 /src/tokenizer.c | |
| parent | 54ea70df985546fa2d1fc95f55b5a83a41ee469c (diff) | |
Syntax change: cast(T)x => T(x); union_cast(T)x => x.(T); transmute(T)x => transmute(T, x); `y:=^x` => `y:=&x;`
Sorry for all the code breaking in this commit :(
Diffstat (limited to 'src/tokenizer.c')
| -rw-r--r-- | src/tokenizer.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/tokenizer.c b/src/tokenizer.c index 9a4ecea59..56186f914 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -76,6 +76,7 @@ TOKEN_KIND(Token__ComparisonEnd, "_ComparisonEnd"), \ TOKEN_KIND(Token_Comma, ","), \ TOKEN_KIND(Token_Ellipsis, ".."), \ TOKEN_KIND(Token_HalfClosed, "..<"), \ + TOKEN_KIND(Token_BackSlash, "\\"), \ TOKEN_KIND(Token__OperatorEnd, "_OperatorEnd"), \ \ TOKEN_KIND(Token__KeywordBegin, "_KeywordBegin"), \ @@ -106,9 +107,9 @@ TOKEN_KIND(Token__KeywordBegin, "_KeywordBegin"), \ TOKEN_KIND(Token_using, "using"), \ TOKEN_KIND(Token_no_alias, "no_alias"), \ TOKEN_KIND(Token_immutable, "immutable"), \ - TOKEN_KIND(Token_cast, "cast"), \ - TOKEN_KIND(Token_transmute, "transmute"), \ - TOKEN_KIND(Token_union_cast, "union_cast"), \ + /* TOKEN_KIND(Token_cast, "cast"), */ \ + /* TOKEN_KIND(Token_transmute, "transmute"), */ \ + /* TOKEN_KIND(Token_union_cast, "union_cast"), */ \ TOKEN_KIND(Token_context, "context"), \ TOKEN_KIND(Token_push_context, "push_context"), \ TOKEN_KIND(Token_push_allocator, "push_allocator"), \ @@ -878,20 +879,21 @@ Token tokenizer_get_token(Tokenizer *t) { } break; - case '#': token.kind = Token_Hash; break; - case '@': token.kind = Token_At; break; - case '$': token.kind = Token_Dollar; break; - case '?': token.kind = Token_Question; break; - case '^': token.kind = Token_Pointer; break; - case ';': token.kind = Token_Semicolon; break; - case ',': token.kind = Token_Comma; break; - case ':': token.kind = Token_Colon; break; - case '(': token.kind = Token_OpenParen; break; - case ')': token.kind = Token_CloseParen; break; - case '[': token.kind = Token_OpenBracket; break; - case ']': token.kind = Token_CloseBracket; break; - case '{': token.kind = Token_OpenBrace; break; - case '}': token.kind = Token_CloseBrace; break; + case '#': token.kind = Token_Hash; break; + case '@': token.kind = Token_At; break; + case '$': token.kind = Token_Dollar; break; + case '?': token.kind = Token_Question; break; + case '^': token.kind = Token_Pointer; break; + case ';': token.kind = Token_Semicolon; break; + case ',': token.kind = Token_Comma; break; + case ':': token.kind = Token_Colon; break; + case '(': token.kind = Token_OpenParen; break; + case ')': token.kind = Token_CloseParen; break; + case '[': token.kind = Token_OpenBracket; break; + case ']': token.kind = Token_CloseBracket; break; + case '{': token.kind = Token_OpenBrace; break; + case '}': token.kind = Token_CloseBrace; break; + case '\\': token.kind = Token_BackSlash; break; case '*': token.kind = token_kind_variant2(t, Token_Mul, Token_MulEq); break; case '%': token.kind = token_kind_variant2(t, Token_Mod, Token_ModEq); break; |