Mercurial > hg > octave-lyh
diff src/lex.h @ 8745:6dc61981d18b
better handling of object indexing in lexer
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 15 Feb 2009 16:31:16 -0500 |
parents | 1652e39b934e |
children | 5dd06f19e9be |
line wrap: on
line diff
--- a/src/lex.h +++ b/src/lex.h @@ -24,6 +24,8 @@ #if !defined (octave_lex_h) #define octave_lex_h 1 +#include <list> + // FIXME -- these input buffer things should be members of a // parser input stream class. @@ -104,8 +106,12 @@ // multi-value assignment statement. bool looking_at_matrix_or_assign_lhs; - // Nonzero means we're parsing an indexing operation for an object. - int looking_at_object_index; + // If the front of the list is TRUE, the closest paren, brace, or + // bracket nesting is an index for an object. + std::list<bool> looking_at_object_index; + + // Object index not possible until we've seen something. + bool looking_for_object_index; // GAG. Stupid kludge so that [[1,2][3,4]] will work. bool do_comma_insert;