Mercurial > hg > octave-lyh
diff src/lex.h @ 9474:25ed2d6aacf6
Parse nested functions more accurately.
author | David Grundberg <individ@acc.umu.se> |
---|---|
date | Thu, 30 Jul 2009 11:52:58 -0400 |
parents | 17af7cce7d1b |
children | d9b25c5b8ee5 |
line wrap: on
line diff
--- a/src/lex.h +++ b/src/lex.h @@ -46,7 +46,8 @@ // Is the given string a keyword? extern bool is_keyword (const std::string& s); -extern void prep_lexer_for_script (void); +extern void prep_lexer_for_script_file (void); +extern void prep_lexer_for_function_file (void); // For communication between the lexer and parser. @@ -117,15 +118,9 @@ bool looking_at_indirect_ref; // TRUE means that we've already seen the name of this function. - // Should only matter if defining_func is also TRUE. + // Should only matter if current_function_level > 0 bool parsed_function_name; - // Are we parsing a nested function? - // 1 ==> Yes. - // 0 ==> No. - // -1 ==> Yes, but it is the last one because we have seen EOF. - int parsing_nested_function; - // TRUE means we are parsing a class method. bool parsing_class_method;