Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
module Synopsis::Core::AST
class Comment
Files: Synopsis/Core/AST.py

Information about a comment related to a declaration. The comments are extracted verbatim by the parsers, and various Linker CommentProcessors can select comments with appropriate formatting (eg: /** style comments, //. style comments, or all // style comments). The text field is text of the comment, less any tags that have been extracted. The summary field contains a summary of the comment, which may be equal to the comment text if there is no extra detail. The summary field is only set by Linker.Comments.Summarizer, which also ensures that there is only one comment for the declaration first. The list of tags in a comment can be extracted by a Linker CommentProcessor, or is an empty list if not set. C++ Comments may be suspect, which means that they were not immediately before a declaration, but the extract_tails option was set so they were kept for the Linker to deal with.


Operations Summary:
 __init__(self, text, file, line, suspect = 0) [Source]
 text(self)
The text of the comment [Source]
 set_text(self, text)
Changes the text [Source]
 summary(self)
The summary of the comment [Source]
 set_summary(self, summary)
Changes the summary [Source]
 tags(self)
The tags of the comment. [Source]
 __str__(self)
Returns the text of the comment [Source]
 file(self)
The file it was defined in [Source]
 line(self)
The line it was defined at [Source]
 is_suspect(self)
Returns true if the comment is suspect [Source]
 set_suspect(self, suspect)
Sets whether the comment is suspect [Source]

Operation Details:
  tags(self)

The tags of the comment. Only CommentTag instances should be added to this list.