changeset 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 f49e47ab83ca
children f40c355491cc
files src/lex.ll
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lex.ll	Wed May 16 17:24:59 2012 -0700
+++ b/src/lex.ll	Thu May 17 00:46:57 2012 -0400
@@ -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);