aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-19 23:59:26 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-19 23:59:26 +0100
commit59b0cf61efdccc44efafda24ff59399dde6afc4d (patch)
tree35162a81623e3482929f7c6e3415d517cdf478eb /src/tokenizer.cpp
parent3b266b194f36507208b6f90145475d93b53896ee (diff)
fmt improvement; Minor refactoring
Diffstat (limited to 'src/tokenizer.cpp')
-rw-r--r--src/tokenizer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp
index f0aa0dc66..88fec813f 100644
--- a/src/tokenizer.cpp
+++ b/src/tokenizer.cpp
@@ -150,6 +150,13 @@ struct Token {
};
Token empty_token = {Token_Invalid};
+Token blank_token = {Token_Identifier, {cast(u8 *)"_", 1}};
+
+Token make_token_ident(String s) {
+ Token t = {Token_Identifier};
+ t.string = s;
+ return t;
+}
struct ErrorCollector {