Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 8e2e08a

Browse files
committed
Just use accept method
1 parent 02c6d0c commit 8e2e08a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/syntax_tree/bf/evaluate.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ def run
102102
end
103103

104104
def self.run(source, stdin: STDIN, stdout: STDOUT)
105-
node = Parser.new(source).parse
106105
compiler = Compiler.new
107-
108-
compiler.visit(node)
106+
Parser.new(source).parse.accept(compiler)
109107
Machine.new(compiler.insns, stdin: stdin, stdout: stdout).run
110108
end
111109
end

0 commit comments

Comments
 (0)