1.1 --- a/moinformat/tree.py Mon Jul 23 16:03:34 2018 +0200
1.2 +++ b/moinformat/tree.py Mon Jul 23 23:50:04 2018 +0200
1.3 @@ -402,7 +402,7 @@
1.4
1.5
1.6
1.7 -# Inline nodes.
1.8 +# Inline nodes with children.
1.9
1.10 class Inline(Container):
1.11
1.12 @@ -541,6 +541,23 @@
1.13 def to_string(self, out):
1.14 out.continuation(self.text)
1.15
1.16 +class Macro(Node):
1.17 +
1.18 + "Macro details."
1.19 +
1.20 + def __init__(self, name, args):
1.21 + self.name = name
1.22 + self.args = args
1.23 +
1.24 + def __repr__(self):
1.25 + return "Macro(%r, %r)" % (self.name, self.args)
1.26 +
1.27 + def prettyprint(self, indent=""):
1.28 + return "%sMacro: name=%r args=%r" % (indent, self.name, self.args)
1.29 +
1.30 + def to_string(self, out):
1.31 + out.macro(self.name, self.args)
1.32 +
1.33 class Rule(Node):
1.34
1.35 "A horizontal rule."