Pretty print n.

Property definitions

nitc $ PrettyPrinterVisitor :: pretty
	# Pretty print `n`.
	fun pretty(n: ANode): Template do
		clear
		n.parentize_tokens

		if n isa Prod then
			current_token = n.first_token
			visit n
		else if n isa Token then
			var p = n.parent

			while p != null and not p isa Prod do
				p = p.parent
			end

			current_token = p.first_token
			visit p
		end

		return tpl.as(not null)
	end
src/pretty.nit:53,2--73,4