summaryrefslogtreecommitdiff
path: root/src/lj_lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_lex.c')
-rw-r--r--src/lj_lex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_lex.c b/src/lj_lex.c
index c85ea314..e464f420 100644
--- a/src/lj_lex.c
+++ b/src/lj_lex.c
@@ -272,9 +272,9 @@ static int llex(LexState *ls, TValue *tv)
272 save_and_next(ls); 272 save_and_next(ls);
273 } while (lj_char_isident(ls->current)); 273 } while (lj_char_isident(ls->current));
274 s = lj_parse_keepstr(ls, ls->sb.buf, ls->sb.n); 274 s = lj_parse_keepstr(ls, ls->sb.buf, ls->sb.n);
275 setstrV(ls->L, tv, s);
275 if (s->reserved > 0) /* Reserved word? */ 276 if (s->reserved > 0) /* Reserved word? */
276 return TK_OFS + s->reserved; 277 return TK_OFS + s->reserved;
277 setstrV(ls->L, tv, s);
278 return TK_name; 278 return TK_name;
279 } 279 }
280 switch (ls->current) { 280 switch (ls->current) {
@@ -330,6 +330,9 @@ static int llex(LexState *ls, TValue *tv)
330 case '~': 330 case '~':
331 next(ls); 331 next(ls);
332 if (ls->current != '=') return '~'; else { next(ls); return TK_ne; } 332 if (ls->current != '=') return '~'; else { next(ls); return TK_ne; }
333 case ':':
334 next(ls);
335 if (ls->current != ':') return ':'; else { next(ls); return TK_label; }
333 case '"': 336 case '"':
334 case '\'': 337 case '\'':
335 read_string(ls, ls->current, tv); 338 read_string(ls, ls->current, tv);