| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| 1 | from coalib.misc.Decorators import generate_eq, generate_repr |
||
| 4 | @generate_repr() |
||
| 5 | @generate_eq("documentation", "docstyle", "marker", "range") |
||
| 6 | class DocumentationComment: |
||
| 7 | """ |
||
| 8 | The DocumentationComment holds information about a documentation comment |
||
| 9 | inside source-code, like position, docstyle etc. |
||
| 10 | """ |
||
| 11 | |||
| 12 | def __init__(self, documentation, docstyle, marker, range): |
||
| 13 | """ |
||
| 14 | Instantiates a new DocumentationComment. |
||
| 15 | |||
| 16 | :param documentation: The documentation text. |
||
| 17 | :param docstyle: The DocstyleDefinition. |
||
| 18 | :param marker: The specific set of marker strings that |
||
| 19 | identified this documentation comment. |
||
| 20 | :param range: The position range of type TextRange. |
||
| 21 | """ |
||
| 22 | self.documentation = documentation |
||
| 23 | self.docstyle = docstyle |
||
| 24 | self.marker = marker |
||
| 25 | self.range = range |
||
| 26 | |||
| 27 | def __str__(self): |
||
| 28 | return self.documentation |
||
| 29 |