# HG changeset patch # User John W. Eaton # Date 1712931676 14400 # Node ID 7e7d52c1e03acb8b41bfedc6a4f41addd31a0281 # Parent d7e4a4e1a8fb335728db778379f43f966e15c777 don't lose comments that appear just before index expressions (bug #65579) * pt-idx.h (tree_index_expression::leading_comments): New function. diff -r d7e4a4e1a8fb -r 7e7d52c1e03a libinterp/parse-tree/pt-idx.h --- 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;