diff libinterp/parse-tree/parse.h @ 28511:59dfd9ed72a3 stable

capture comments for classdef classes, properties, events, and enumerations * parse.h, oct-parse.yy: Refactor parser rules for collecting comments and docstrings for classdef parse tree elements. * pt-classdef.h, pt-classdef.cc (tree_classdef_property, tree_classdef_event, tree_classdef_enum): Store comments and docstrings and provide access to them. (tree_classdef_body): Store docstring for classdef object. (tree_classdef): Provide access to classdef docstring from classdef body object.
author John W. Eaton <jwe@octave.org>
date Thu, 28 May 2020 13:48:37 -0400
parents 808e3964987b
children 70d155283f33 d45d1b4bb919
line wrap: on
line diff
--- a/libinterp/parse-tree/parse.h	Fri May 29 11:00:41 2020 -0400
+++ b/libinterp/parse-tree/parse.h	Thu May 28 13:48:37 2020 -0400
@@ -353,31 +353,35 @@
     make_classdef (token *tok_val, tree_classdef_attribute_list *a,
                    tree_identifier *id, tree_classdef_superclass_list *sc,
                    tree_classdef_body *body, token *end_tok,
-                   comment_list *lc);
+                   comment_list *lc, comment_list *tc);
 
     tree_classdef_properties_block *
     make_classdef_properties_block (token *tok_val,
                                     tree_classdef_attribute_list *a,
                                     tree_classdef_property_list *plist,
-                                    token *end_tok, comment_list *lc);
+                                    token *end_tok, comment_list *lc,
+                                    comment_list *tc);
 
     tree_classdef_methods_block *
     make_classdef_methods_block (token *tok_val,
                                  tree_classdef_attribute_list *a,
                                  tree_classdef_methods_list *mlist,
-                                 token *end_tok, comment_list *lc);
+                                 token *end_tok, comment_list *lc,
+                                 comment_list *tc);
 
     tree_classdef_events_block *
     make_classdef_events_block (token *tok_val,
                                 tree_classdef_attribute_list *a,
                                 tree_classdef_events_list *elist,
-                                token *end_tok, comment_list *lc);
+                                token *end_tok, comment_list *lc,
+                                comment_list *tc);
 
     tree_classdef_enum_block *
     make_classdef_enum_block (token *tok_val,
                               tree_classdef_attribute_list *a,
                               tree_classdef_enum_list *elist,
-                              token *end_tok, comment_list *lc);
+                              token *end_tok, comment_list *lc,
+                              comment_list *tc);
 
     octave_user_function *
     start_classdef_external_method (tree_identifier *id,