Mercurial > octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
30143:45c45295a84a | 30144:3c2dee80b542 |
---|---|
68 | 68 |
69 tree_index_expression& operator = (const tree_index_expression&) = delete; | 69 tree_index_expression& operator = (const tree_index_expression&) = delete; |
70 | 70 |
71 ~tree_index_expression (void); | 71 ~tree_index_expression (void); |
72 | 72 |
73 void append (tree_argument_list *lst = nullptr, char t = '('); | 73 tree_index_expression * |
74 append (tree_argument_list *lst = nullptr, char t = '('); | |
74 | 75 |
75 void append (const std::string& n); | 76 tree_index_expression * append (const std::string& n); |
76 | 77 |
77 void append (tree_expression *df); | 78 tree_index_expression * append (tree_expression *df); |
78 | 79 |
79 bool is_index_expression (void) const { return true; } | 80 bool is_index_expression (void) const { return true; } |
80 | 81 |
81 std::string name (void) const; | 82 std::string name (void) const; |
82 | 83 |