changeset 18246:043ce3787849 gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Wed, 08 Jan 2014 01:37:50 -0500
parents c7fe55478e11 (current diff) 1f072ae35ede (diff)
children 89e3601c33aa 545a77c3206e
files libinterp/parse-tree/lex.ll
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Tue Jan 07 22:07:28 2014 -0500
+++ b/libinterp/parse-tree/lex.ll	Wed Jan 08 01:37:50 2014 -0500
@@ -2634,7 +2634,15 @@
     {
       comment_text = &yytxt[offset];
 
+      // finish_comment sets at_beginning_of_statement to true but
+      // that's not be correct if we are handling a continued
+      // statement.  Preserve the current state.
+
+      bool saved_bos = at_beginning_of_statement;
+
       finish_comment (octave_comment_elt::end_of_line);
+
+      at_beginning_of_statement = saved_bos;
     }
 
   decrement_promptflag ();
--- a/test/parser.tst	Tue Jan 07 22:07:28 2014 -0500
+++ b/test/parser.tst	Wed Jan 08 01:37:50 2014 -0500
@@ -283,3 +283,7 @@
 %! xyz(1) = 1; xyz /= 1;
 %! assert (xyz, 1);
 
+%!test
+%! a = [97 ... % comment
+%!      'b'];
+%! assert (a, 'ab');