Mercurial > octave-nkf
diff libinterp/parse-tree/lex.ll @ 18340:a91654d70f99
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Jan 2014 03:43:41 -0500 |
parents | 9d62b5f041ee 1ecfcfa4858e |
children | 02b349ccf0ec |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Wed Jan 22 22:47:14 2014 -0800 +++ b/libinterp/parse-tree/lex.ll Thu Jan 23 03:43:41 2014 -0500 @@ -2313,6 +2313,8 @@ if (kw) { + bool previous_at_bos = at_beginning_of_statement; + // May be reset to true for some token types. at_beginning_of_statement = false; @@ -2346,7 +2348,10 @@ && (defining_func && ! (looking_at_return_list || parsed_function_name.top ())))) - return 0; + { + at_beginning_of_statement = previous_at_bos; + return 0; + } tok_val = new token (end_kw, token::simple_end, l, c); at_beginning_of_statement = true; @@ -2448,7 +2453,10 @@ // 'get' and 'set' are keywords in classdef method // declarations. if (! maybe_classdef_get_set_method) - return 0; + { + at_beginning_of_statement = previous_at_bos; + return 0; + } break; case enumeration_kw: @@ -2458,7 +2466,10 @@ // 'properties', 'methods' and 'events' are keywords for // classdef blocks. if (! parsing_classdef) - return 0; + { + at_beginning_of_statement = previous_at_bos; + return 0; + } // fall through ... case classdef_kw: