diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-25 19:17:57 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-05-25 21:02:40 +0200 |
commit | 5879bdf94fa8f899a1961f6eb5fbc4aacfa84b2a (patch) | |
tree | fe91228a2b8e9636a8f7b58ca09d3b3d1332460d /lexer.c | |
parent | d4edadc839bd0b5a1345c9f5a42dd8a8d0cdf4f1 (diff) |
syntax: drop Infinity and NaN keywords
Turn the Infinity and NaN keywords into global properties.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -136,7 +136,6 @@ static const struct token tokens[] = { static const struct keyword reserved_words[] = { { TK_ENDFUNC, "endfunction", 11, { 0 } }, - { TK_DOUBLE, "Infinity", 8, { .d = INFINITY } }, { TK_CONTINUE, "continue", 8, { 0 } }, { TK_ENDWHILE, "endwhile", 8, { 0 } }, { TK_FUNC, "function", 8, { 0 } }, @@ -160,7 +159,6 @@ static const struct keyword reserved_words[] = { { TK_THIS, "this", 4, { 0 } }, { TK_NULL, "null", 4, { 0 } }, { TK_CASE, "case", 4, { 0 } }, - { TK_DOUBLE, "NaN", 3, { .d = NAN } }, { TK_TRY, "try", 3, { 0 } }, { TK_FOR, "for", 3, { 0 } }, { TK_LOCAL, "let", 3, { 0 } }, @@ -742,10 +740,6 @@ parse_label(uc_lexer *lex) lookbehind_reset(lex); switch (word->type) { - case TK_DOUBLE: - rv = emit_op(lex, lex->source->off - word->plen, word->type, ucv_double_new(word->u.d)); - break; - case TK_BOOL: rv = emit_op(lex, lex->source->off - word->plen, word->type, ucv_boolean_new(word->u.b)); break; |