kopia lustrzana https://github.com/micropython/micropython
c85db05244
Set the position of new line tokens as the end of the preceding line instead of the beginning of the next line. This is done by first moving the pointer to the end of the current line to skip any whitespace, record the position for the token, then finaly skip any other line and whitespace. The previous behavior was to skip every new line and whitespace, including the indent of the next line, before recording the token position. (Note that both lex->emit_dent and lex->nested_bracket_level equal 0 if had_physical_newline == true, which allows simplifying the if-logic for MP_TOKEN_NEWLINE.) And update the cmd_parsetree.py test expected output, because the position of the new-line token has changed. Fixes issue #12792. Signed-off-by: Mathieu Serandour <mathieu.serandour@numworks.fr> |
||
---|---|---|
.. | ||
cmd_optimise.py | ||
cmd_optimise.py.exp | ||
cmd_parsetree.py | ||
cmd_parsetree.py.exp | ||
cmd_showbc.py | ||
cmd_showbc.py.exp | ||
cmd_showbc_const.py | ||
cmd_showbc_const.py.exp | ||
cmd_showbc_opt.py | ||
cmd_showbc_opt.py.exp | ||
cmd_verbose.py | ||
cmd_verbose.py.exp | ||
repl_autocomplete.py | ||
repl_autocomplete.py.exp | ||
repl_autoindent.py | ||
repl_autoindent.py.exp | ||
repl_basic.py | ||
repl_basic.py.exp | ||
repl_cont.py | ||
repl_cont.py.exp | ||
repl_emacs_keys.py | ||
repl_emacs_keys.py.exp | ||
repl_inspect.py | ||
repl_inspect.py.exp | ||
repl_micropyinspect | ||
repl_micropyinspect.py | ||
repl_micropyinspect.py.exp | ||
repl_sys_ps1_ps2.py | ||
repl_sys_ps1_ps2.py.exp | ||
repl_words_move.py | ||
repl_words_move.py.exp |