diff --git a/libinterp/parse-tree/lex.ll b/libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -2903,10 +2903,10 @@ looks_like_shebang (const std::string& s if ((m_reading_fcn_file || m_reading_script_file || m_reading_classdef_file) && ! m_fcn_file_full_name.empty ()) - tok_val = new token (magic_file_kw, m_fcn_file_full_name, + tok_val = new token (kw->tok, m_fcn_file_full_name, m_tok_beg, m_tok_end); else - tok_val = new token (magic_file_kw, "stdin", m_tok_beg, m_tok_end); + tok_val = new token (kw->tok, "stdin", m_tok_beg, m_tok_end); } break; @@ -2914,8 +2914,7 @@ looks_like_shebang (const std::string& s { int l = m_tok_beg.line (); octave_value ov_value (static_cast (l)); - tok_val = new token (magic_line_kw, ov_value, "", - m_tok_beg, m_tok_end); + tok_val = new token (kw->tok, ov_value, "", m_tok_beg, m_tok_end); } break;