waypoint -- jison has a reverse order of operations from yacc

This commit is contained in:
Jeremy Ashkenas
2010-02-11 23:29:12 -05:00
parent 7c01bba4f4
commit 13c49ad865
5 changed files with 9 additions and 9 deletions

View File

@@ -105,8 +105,8 @@ Node::contains: (block) ->
# toString representation of the node, for inspecting the parse tree.
Node::toString: (idt) ->
idt ||= ''
(@type || 'anon') + "\n" + (idt + TAB + child.toString(idt + TAB) for child in @children)
idt: (idt || '') + TAB
@type + "\n" + (idt + child.toString(idt) for child in @children).join('')
# Default implementations of the common node methods.
Node::unwrap: -> this