Mercurial > hg > octave-lyh
diff src/oct-parse.yy @ 14293:71a198cca35b
improve parsing of classdef methods
* oct-parse.yy (fcn_name):
also set lexer_flags.parsed_function_name.top() to true when
recognizing classdef set.PROPERTY or get.PROPERTY methods.
(parse_fcn_file): Also set reading_script_file to true when reading
classdef files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 30 Jan 2012 23:06:01 -0500 |
parents | c27491205e48 |
children | 9e3983c8963c |
line wrap: on
line diff
--- a/src/oct-parse.yy +++ b/src/oct-parse.yy @@ -1395,11 +1395,13 @@ } | GET '.' identifier { + lexer_flags.parsed_function_name.top () = true; lexer_flags.maybe_classdef_get_set_method = false; $$ = $3; } | SET '.' identifier { + lexer_flags.parsed_function_name.top () = true; lexer_flags.maybe_classdef_get_set_method = false; $$ = $3; } @@ -3515,7 +3517,11 @@ reading_classdef_file = true; reading_fcn_file = false; - reading_script_file = false; + // FIXME -- Should classdef files be handled as + // scripts or separately? Currently, without setting up + // for reading script files, parsing classdef files + // fails. + reading_script_file = true; } else {