From c26441474686a5fac93c82d9759b7ed91bed2978 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 16 Feb 2017 20:23:41 +1100 Subject: [PATCH] py/lexer: Don't generate string representation for period or ellipsis. It's not needed. --- py/lexer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/py/lexer.c b/py/lexer.c index 33af21e9c3..d89322ed7f 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -574,12 +574,9 @@ STATIC void mp_lexer_next_token_into(mp_lexer_t *lex, bool first_token) { // special handling for . and ... operators, because .. is not a valid operator // get first char - vstr_add_char(&lex->vstr, '.'); next_char(lex); if (is_char_and(lex, '.', '.')) { - vstr_add_char(&lex->vstr, '.'); - vstr_add_char(&lex->vstr, '.'); next_char(lex); next_char(lex); lex->tok_kind = MP_TOKEN_ELLIPSIS;