summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lexer.c b/lexer.c
index 40dfd67..a8b7716 100644
--- a/lexer.c
+++ b/lexer.c
@@ -138,6 +138,7 @@ lex_alphanum(void) {
t.value[i] = '\0';
column_number += i;
+ t.span = i;
if (i == 0) {
emit_error("Expected alphanumeric, got '%c'\n", buf[i]);
@@ -163,6 +164,7 @@ lex_eol(void) {
t.type = TOK_EOL;
t.loc = get_current_loc();
+ t.span = 1;
expect('\n');
@@ -175,6 +177,7 @@ lex_colon(void) {
t.type = TOK_COLON;
t.loc = get_current_loc();
+ t.span = 1;
expect(':');