diff libinterp/parse-tree/pt-idx.h @ 33378:7e7d52c1e03a

don't lose comments that appear just before index expressions (bug #65579) * pt-idx.h (tree_index_expression::leading_comments): New function.
author John W. Eaton <jwe@octave.org>
date Fri, 12 Apr 2024 10:21:16 -0400
parents d422992b5483
children
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.h	Fri Apr 12 15:10:26 2024 +0200
+++ b/libinterp/parse-tree/pt-idx.h	Fri Apr 12 10:21:16 2024 -0400
@@ -73,6 +73,8 @@
 
   std::string name () const;
 
+  comment_list leading_comments () const { return m_expr->leading_comments (); }
+
   filepos beg_pos () const { return m_expr->beg_pos (); }
   filepos end_pos () const;