commit abd1c75c4aa70a83884e0509820dff8a6e51430c (tree)
parent 608bc1cbd5910ee796cc292b43db77547858bf98
Author: Isaac Freund <ifreund@ifreund.xyz>
Date: Mon, 31 May 2021 19:14:33 +0000
stage1: disallow 1.e9 and 0x1.p9 as float literals
Diffstat:
1 file changed, 0 insertions(+), 8 deletions(-)
diff --git a/src/stage1/tokenizer.cpp b/src/stage1/tokenizer.cpp
@@ -1286,10 +1286,6 @@ void tokenize(const char *source, Tokenization *out) {
t.column -= 1;
t.state = TokenizeState_start;
continue;
- case 'e':
- case 'E':
- t.state = TokenizeState_float_exponent_unsigned;
- break;
case DIGIT:
t.state = TokenizeState_float_fraction_dec;
break;
@@ -1308,10 +1304,6 @@ void tokenize(const char *source, Tokenization *out) {
t.column -= 1;
t.state = TokenizeState_start;
continue;
- case 'p':
- case 'P':
- t.state = TokenizeState_float_exponent_unsigned;
- break;
case HEXDIGIT:
t.out->ids.last() = TokenIdFloatLiteral;
t.state = TokenizeState_float_fraction_hex;