Output nodes are always lists

Right now we don't optimize Output nodes so that ones next to each
other are combined, but they should all contain a list of a single
node in preparation for eventually doing that.
This commit is contained in:
Kevin 2020-05-10 10:43:50 -04:00
parent 80a6e5b3e7
commit a2d262fde4

View File

@ -95,7 +95,7 @@ def parse_print(ast):
for accessor_ast in variable['accessors']:
node = parse_variable_accessor(node, accessor_ast)
return nodes.Output(node)
return nodes.Output([node])
def parse_template(ast):
return nodes.Template(parse(ast), lineno=1)