micropython/tests/cmdline
Mathieu Serandour c85db05244 py/lexer: Change token position for new lines.
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>
2023-11-03 15:56:10 +11:00
..
cmd_optimise.py
cmd_optimise.py.exp
cmd_parsetree.py py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00
cmd_parsetree.py.exp py/lexer: Change token position for new lines. 2023-11-03 15:56:10 +11:00
cmd_showbc.py py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
cmd_showbc.py.exp py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
cmd_showbc_const.py py/parse: Allow const types other than int to optimise as true/false. 2022-09-23 16:04:13 +10:00
cmd_showbc_const.py.exp py/parse: Allow const types other than int to optimise as true/false. 2022-09-23 16:04:13 +10:00
cmd_showbc_opt.py py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
cmd_showbc_opt.py.exp py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
cmd_verbose.py
cmd_verbose.py.exp py: Rework bytecode and .mpy file format to be mostly static data. 2022-02-24 18:08:43 +11:00
repl_autocomplete.py py/repl: Generalise REPL autocomplete to use qstr probing. 2018-02-19 16:12:44 +11:00
repl_autocomplete.py.exp py/repl: Generalise REPL autocomplete to use qstr probing. 2018-02-19 16:12:44 +11:00
repl_autoindent.py tests/cmdline: Add test for REPL auto-indent. 2022-04-22 17:00:16 +10:00
repl_autoindent.py.exp tests/cmdline: Add test for REPL auto-indent. 2022-04-22 17:00:16 +10:00
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 unix: Improve command line argument processing. 2021-04-07 12:41:25 +10:00
repl_inspect.py.exp unix: Improve command line argument processing. 2021-04-07 12:41:25 +10:00
repl_micropyinspect tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
repl_micropyinspect.py tests/cmdline: Add test for MICROPYINSPECT environment variable. 2020-02-04 17:54:31 +11:00
repl_micropyinspect.py.exp tests/cmdline: Add test for MICROPYINSPECT environment variable. 2020-02-04 17:54:31 +11:00
repl_sys_ps1_ps2.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
repl_sys_ps1_ps2.py.exp tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
repl_words_move.py lib/mp-readline: Add word-based move/delete EMACS key sequences. 2020-01-12 13:09:27 +11:00
repl_words_move.py.exp lib/mp-readline: Add word-based move/delete EMACS key sequences. 2020-01-12 13:09:27 +11:00