diff libinterp/parse-tree/oct-parse.in.yy @ 24377:ea3458c1d884

improve handling of invalid symbol_scope objects (bug #52607) * symscope.h (class symbol_scope): Validate all uses of m_rep. (symbol_scope::symbol_scope (const std::string&)): Don't provide default argument value. Any named scope is considered valid, even if the name is "". (symbol_scope::symbol_scope (symbol_scope_rep *)): Provide default argument of nullptr. If m_rep is nullptr, then the scope is invalid.
author John W. Eaton <jwe@octave.org>
date Thu, 07 Dec 2017 01:31:34 -0500
parents 8bcfddad15ec
children 53ca76c5cc8d
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy	Wed Dec 06 18:49:31 2017 -0800
+++ b/libinterp/parse-tree/oct-parse.in.yy	Thu Dec 07 01:31:34 2017 -0500
@@ -1452,7 +1452,8 @@
                   {
                     $$ = 0;
 
-                    // Will get a real name later.
+                    // This scope may serve as the parent scope for local
+                    // functions in classdef files..
                     lexer.symtab_context.push (octave::symbol_scope ("parser:push_script_symtab"));
                   }
                 ;