Mercurial > octave-nkf
diff libinterp/parse-tree/pt-arg-list.cc @ 16755:787168f5f858
tag symbols in indexed assignments as variables (bug #39240)
* pt-arg-list.cc (tree_argument_list::variable_names): Also return the
symbol names from index expressions.
* parser.tst: New test.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 12 Jun 2013 10:50:29 -0400 |
parents | 11115c237231 |
children | f0edd6c752e9 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-arg-list.cc Wed Jun 12 10:03:50 2013 -0400 +++ b/libinterp/parse-tree/pt-arg-list.cc Wed Jun 12 10:50:29 2013 -0400 @@ -298,6 +298,13 @@ retval.push_back (id->name ()); } + else if (elt->is_index_expression ()) + { + tree_index_expression *idx_expr + = dynamic_cast<tree_index_expression *> (elt); + + retval.push_back (idx_expr->name ()); + } } return retval;