Mercurial > hg > octave-nkf
diff src/lex.h @ 11464:21b5284fa78d
avoid error when parsing nested functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 09 Jan 2011 14:33:55 -0500 |
parents | b2191ebea12f |
children | 6dbf9bcce90e |
line wrap: on
line diff
--- a/src/lex.h +++ b/src/lex.h @@ -25,6 +25,7 @@ #define octave_lex_h 1 #include <list> +#include <stack> // FIXME -- these input buffer things should be members of a // parser input stream class. @@ -117,9 +118,10 @@ // structure element. bool looking_at_indirect_ref; - // TRUE means that we've already seen the name of this function. - // Should only matter if current_function_level > 0 - bool parsed_function_name; + // If the top of the stack is TRUE, then we've already seen the name + // of the current function. Should only matter if + // current_function_level > 0 + std::stack<bool> parsed_function_name; // TRUE means we are parsing a class method in function or classdef file. bool parsing_class_method;