1.1 --- a/moinformat/tree/moin.py Tue Aug 07 17:05:58 2018 +0200
1.2 +++ b/moinformat/tree/moin.py Tue Aug 07 17:06:26 2018 +0200
1.3 @@ -621,6 +621,40 @@
1.4 def to_string(self, out):
1.5 out.break_()
1.6
1.7 +class Comment(Node):
1.8 +
1.9 + "A comment."
1.10 +
1.11 + def __init__(self, comment, extra):
1.12 + self.comment = comment
1.13 + self.extra = extra
1.14 +
1.15 + def __repr__(self):
1.16 + return "Comment(%r, %r)" % (self.comment, self.extra)
1.17 +
1.18 + def prettyprint(self, indent=""):
1.19 + return "%sComment: comment=%r extra=%r" % (indent, self.comment, self.extra)
1.20 +
1.21 + def to_string(self, out):
1.22 + out.comment(self.comment, self.extra)
1.23 +
1.24 +class Directive(Node):
1.25 +
1.26 + "A processing directive."
1.27 +
1.28 + def __init__(self, directive, extra):
1.29 + self.directive = directive
1.30 + self.extra = extra
1.31 +
1.32 + def __repr__(self):
1.33 + return "Directive(%r, %r)" % (self.directive, self.extra)
1.34 +
1.35 + def prettyprint(self, indent=""):
1.36 + return "%sDirective: directive=%r extra=%r" % (indent, self.directive, self.extra)
1.37 +
1.38 + def to_string(self, out):
1.39 + out.directive(self.directive, self.extra)
1.40 +
1.41 class LineBreak(Node):
1.42
1.43 "A line break within a block."