aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-02 14:14:12 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-02 14:14:12 +0100
commit25e9b9bc87a5b4fa14fc7d47ca3077849ee5648d (patch)
tree115e165013c52edd77777f9bd64e212e0b29f7c8 /src/tokenizer.cpp
parentfa09d805e23c59cb881573a7a1aee5fbc5752ea2 (diff)
min, max, abs
Diffstat (limited to 'src/tokenizer.cpp')
-rw-r--r--src/tokenizer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp
index 9d9351923..23ba6abd2 100644
--- a/src/tokenizer.cpp
+++ b/src/tokenizer.cpp
@@ -78,6 +78,7 @@ TOKEN_KIND(Token__ComparisonEnd, "_ComparisonEnd"), \
TOKEN_KIND(Token_Period, "."), \
TOKEN_KIND(Token_Comma, ","), \
TOKEN_KIND(Token_Ellipsis, ".."), \
+ TOKEN_KIND(Token_RangeExclusive, "..<"), \
TOKEN_KIND(Token__OperatorEnd, "_OperatorEnd"), \
\
TOKEN_KIND(Token__KeywordBegin, "_KeywordBegin"), \
@@ -93,6 +94,7 @@ TOKEN_KIND(Token__KeywordBegin, "_KeywordBegin"), \
TOKEN_KIND(Token_if, "if"), \
TOKEN_KIND(Token_else, "else"), \
TOKEN_KIND(Token_for, "for"), \
+ TOKEN_KIND(Token_range, "range"), \
TOKEN_KIND(Token_defer, "defer"), \
TOKEN_KIND(Token_return, "return"), \
TOKEN_KIND(Token_struct, "struct"), \
@@ -100,6 +102,8 @@ TOKEN_KIND(Token__KeywordBegin, "_KeywordBegin"), \
TOKEN_KIND(Token_raw_union, "raw_union"), \
TOKEN_KIND(Token_enum, "enum"), \
TOKEN_KIND(Token_using, "using"), \
+ TOKEN_KIND(Token_asm, "asm"), \
+ TOKEN_KIND(Token_volatile, "volatile"), \
TOKEN_KIND(Token__KeywordEnd, "_KeywordEnd"), \
TOKEN_KIND(Token_Count, "")
@@ -711,6 +715,10 @@ Token tokenizer_get_token(Tokenizer *t) {
} else if (t->curr_rune == '.') { // Could be an ellipsis
advance_to_next_rune(t);
token.kind = Token_Ellipsis;
+ if (t->curr_rune == '<') {
+ advance_to_next_rune(t);
+ token.kind = Token_RangeExclusive;
+ }
}
break;