Mercurial > hg > octave-nkf
diff libinterp/parse-tree/lex.ll @ 18409:02b349ccf0ec
Allow "end" method declaration/definition in classde files.
* lex.ll (octave_base_lexer::is_keyword_token): Allow "end" keyword as
function/method name in classdef files.
* oct-parse.in.yy (rule method_decl): Add mid-rule action to enable
proper function name parsing, e.g. allowing "end" as function/method
name.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 23 Jan 2014 10:38:10 -0500 |
parents | a91654d70f99 |
children | fc0ce9eb9d82 |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -2344,10 +2344,9 @@ case end_kw: if (inside_any_object_index () - || (! reading_classdef_file - && (defining_func - && ! (looking_at_return_list - || parsed_function_name.top ())))) + || (defining_func + && ! (looking_at_return_list + || parsed_function_name.top ()))) { at_beginning_of_statement = previous_at_bos; return 0;