Mercurial > octave
diff libinterp/parse-tree/comment-list.h @ 28510:a3ea758870dc stable
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.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 29 May 2020 11:00:41 -0400 |
parents | bd51beb6205e |
children | 0a5b15007766 |
line wrap: on
line diff
--- 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: