diff libinterp/parse-tree/pt-idx.h @ 30144:3c2dee80b542

attempt more uniform handling of list concatenation in the parser * parse.h, oct-parse.yy (append_if_clause, append_switch_case, append_function_body, append_classdef_property, append_classdef_event, append_classdef_enum, append_classdef_superclass, append_classdef_attribute, append_classdef_properties_block, append_classdef_methods_block, append_classdef_events_block, append_classdef_enum_block, append_classdef_method, append_decl_init_list, append_argument_list): New base_parser methods. Use them to simplify actions in parser grammar. * pt-idx.h, pt-idx.cc (tree_index_expression::append): Return pointer to this. Change uses where needed.
author John W. Eaton <jwe@octave.org>
date Thu, 09 Sep 2021 13:27:49 -0400
parents 0a5b15007766
children 796f54d4ddbf
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.h	Thu Sep 09 08:18:52 2021 -0700
+++ b/libinterp/parse-tree/pt-idx.h	Thu Sep 09 13:27:49 2021 -0400
@@ -70,11 +70,12 @@
 
     ~tree_index_expression (void);
 
-    void append (tree_argument_list *lst = nullptr, char t = '(');
+    tree_index_expression *
+    append (tree_argument_list *lst = nullptr, char t = '(');
 
-    void append (const std::string& n);
+    tree_index_expression * append (const std::string& n);
 
-    void append (tree_expression *df);
+    tree_index_expression * append (tree_expression *df);
 
     bool is_index_expression (void) const { return true; }