Mercurial > jwe > octave
changeset 24063:c81ed514ca2c
give script scopes names
* oct-parse.in.yy (base_parser::make_script): Set name of scope to
full file name.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 18 Sep 2017 12:49:54 -0400 |
parents | 6570fdb7d3a0 |
children | 5bf2e2ceace2 |
files | libinterp/parse-tree/oct-parse.in.yy |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy Wed Sep 20 10:23:16 2017 -0700 +++ b/libinterp/parse-tree/oct-parse.in.yy Mon Sep 18 12:49:54 2017 -0400 @@ -3234,10 +3234,13 @@ cmds->append (end_script); + symbol_table::scope *script_scope = m_lexer.symtab_context.curr_scope (); + + script_scope->cache_name (m_lexer.fcn_file_full_name); + octave_user_script *script = new octave_user_script (m_lexer.fcn_file_full_name, - m_lexer.fcn_file_name, - m_lexer.symtab_context.curr_scope (), + m_lexer.fcn_file_name, script_scope, cmds, m_lexer.help_text); m_lexer.symtab_context.pop ();