Mercurial > hg > octave-nkf
diff src/lex.ll @ 14645:cbc00b587f36
also allow "end" indexing in classdef files
* lex.ll (is_keyword_token): Return zero if looking at end inside an
object index in classdef files.
From James Laird <james.laird@nicta.com.au>.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 17 May 2012 00:46:57 -0400 |
parents | 6edd02858516 |
children | 7c463e490062 |
line wrap: on
line diff
--- a/src/lex.ll +++ b/src/lex.ll @@ -1525,11 +1525,11 @@ break; case end_kw: - if (! reading_classdef_file - && (inside_any_object_index () - || (lexer_flags.defining_func + if (inside_any_object_index () + || (! reading_classdef_file + && (lexer_flags.defining_func && ! (lexer_flags.looking_at_return_list - || lexer_flags.parsed_function_name.top ())))) + || lexer_flags.parsed_function_name.top ()))) return 0; yylval.tok_val = new token (token::simple_end, l, c);