Skip to content

Commit 7410e44

Browse files
committed
Add basic complex number support.
1 parent fecee2b commit 7410e44

5 files changed

Lines changed: 247 additions & 35 deletions

File tree

py/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static void push_result_token(parser_t *parser, const py_lexer_t *lex) {
218218
int_val = base * int_val + str[i] - 'a' + 10;
219219
} else if (base == 16 && 'F' <= str[i] && str[i] <= 'F') {
220220
int_val = base * int_val + str[i] - 'A' + 10;
221-
} else if (str[i] == '.' || str[i] == 'e' || str[i] == 'E') {
221+
} else if (str[i] == '.' || str[i] == 'e' || str[i] == 'E' || str[i] == 'j' || str[i] == 'J') {
222222
dec = true;
223223
break;
224224
} else {

0 commit comments

Comments
 (0)