mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
py/lexer: Add support for underscores in numeric literals.
This is a very convenient feature introduced in Python 3.6 by PEP 515.
This commit is contained in:
@@ -590,6 +590,8 @@ void mp_lexer_to_next(mp_lexer_t *lex) {
|
||||
}
|
||||
vstr_add_char(&lex->vstr, CUR_CHAR(lex));
|
||||
next_char(lex);
|
||||
} else if (is_char(lex, '_')) {
|
||||
next_char(lex);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user