diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-08-31 00:52:19 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-08-31 00:52:19 +0100 |
| commit | 5399463d9d9f94a20fb6b80814318e2b154b199a (patch) | |
| tree | c8508a4544f7292f00d4547fb5875aaa00e5307f /src/tokenizer.cpp | |
| parent | cda0234d487ab73a1c87cbdcd74e300718ca7d0a (diff) | |
`down_cast`
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 5cf787075..7581771e4 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -30,6 +30,7 @@ TOKEN_KIND(Token__OperatorBegin, "_OperatorBegin"), \ \ TOKEN_KIND(Token_as, "as"), \ TOKEN_KIND(Token_transmute, "transmute"), \ + TOKEN_KIND(Token_down_cast, "down_cast"), \ \ TOKEN_KIND(Token_Prime, "'"), \ TOKEN_KIND(Token_DoublePrime, "''"), \ @@ -207,6 +208,7 @@ i32 token_precedence(Token t) { return 6; case Token_as: case Token_transmute: + case Token_down_cast: return 7; } @@ -629,6 +631,8 @@ Token tokenizer_get_token(Tokenizer *t) { token.kind = Token_as; } else if (are_strings_equal(token.string, token_strings[Token_transmute])) { token.kind = Token_transmute; + } else if (are_strings_equal(token.string, token_strings[Token_down_cast])) { + token.kind = Token_down_cast; } else { for (i32 k = Token__KeywordBegin+1; k < Token__KeywordEnd; k++) { if (are_strings_equal(token.string, token_strings[k])) { |