Use IO in print_visitor, and add to_s method.
This commit is contained in:
@@ -7,6 +7,6 @@ module Chalk
|
||||
tokens = lexer.lex(File.read("test.txt"))
|
||||
trees = parser.parse?(tokens)
|
||||
trees.try do |trees|
|
||||
trees.each &.accept(PrintVisitor.new)
|
||||
trees.each { |tree| puts tree }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user