Mercurial > octave
changeset 29903:ef865fcd4611
don't check status of symbol as variable when parsing at top level (bug #60882)
* lex.ll (base_lexer::handle_identifier): Don't check whether
identifier is a top-level variable. Matlab apparently doesn't check
either, so the behavior is the same whether at the command line or in
a function or script.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Jul 2021 13:25:46 -0400 |
parents | 3cb8519fed0f |
children | 4f51ea7a510a |
files | libinterp/parse-tree/lex.ll |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Wed Jul 21 18:51:54 2021 +0200 +++ b/libinterp/parse-tree/lex.ll Wed Jul 21 13:25:46 2021 -0400 @@ -3568,9 +3568,7 @@ || ident == "I" || ident == "i" || ident == "J" || ident == "j" || ident == "Inf" || ident == "inf" - || ident == "NaN" || ident == "nan" - || (m_interpreter.at_top_level () - && m_interpreter.is_variable (ident)))) + || ident == "NaN" || ident == "nan")) tok->mark_may_be_command (); push_token (tok);