# HG changeset patch # User John W. Eaton # Date 1590764441 14400 # Node ID a3ea758870dcd6419b00e3b352f99087f0fe1034 # Parent 06bc2f0bf760d15d99b8d854c189634bf41ceac9 new comment_elt predicates * comment-list.h (comment_elt::is_block, comment_elt::is_full_line, comment_elt::is_end_of_line, comment_elt::is_doc_string, comment_elt::is_copyright): New functions. diff -r 06bc2f0bf760 -r a3ea758870dc libinterp/parse-tree/comment-list.h --- a/libinterp/parse-tree/comment-list.h Thu May 28 12:00:24 2020 -0400 +++ b/libinterp/parse-tree/comment-list.h Fri May 29 11:00:41 2020 -0400 @@ -76,6 +76,12 @@ comment_type type (void) const { return m_type; } + bool is_block (void) const { return m_type == block; } + bool is_full_line (void) const { return m_type == full_line; } + bool is_end_of_line (void) const { return m_type == end_of_line; } + bool is_doc_string (void) const { return m_type == doc_string; } + bool is_copyright (void) const { return m_type == copyright; } + ~comment_elt (void) = default; private: