all repos — grayfriday @ 37ffc1c86af55d060efdb8eaf9e003bf8e3fd770

blackfriday fork with a few changes

Make Node satisfy the Stringer interface

It allows for printing AST dumps in external code
Pierre Neidhardt ambrevar@gmail.com
Fri, 01 Jul 2016 13:24:44 +0200
commit

37ffc1c86af55d060efdb8eaf9e003bf8e3fd770

parent

3575453f087dcd9b4d23359ca1bf8563d3c3754f

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M node.gonode.go

@@ -310,6 +310,10 @@ nw.entering = entering

return nw.next() } +func (ast *Node) String() string { + return dumpString(ast) +} + func dump(ast *Node) { fmt.Println(dumpString(ast)) }