shard-ameba/spec/ameba/ast/traverse_spec.cr

19 lines
393 B
Crystal
Raw Normal View History

2017-11-01 11:10:34 +00:00
require "../../spec_helper"
2017-10-31 23:06:47 +00:00
2017-11-01 11:10:34 +00:00
module Ameba::AST
2017-10-31 23:06:47 +00:00
rule = DummyRule.new
source = Source.new ""
2017-11-01 11:10:34 +00:00
describe "Traverse" do
2017-11-15 18:49:09 +00:00
{% for name in NODES %}
2017-10-31 23:06:47 +00:00
describe "{{name}}" do
it "allow to visit {{name}} node" do
visitor = Visitor.new rule, source
2017-10-31 23:06:47 +00:00
nodes = Crystal::Parser.new("").parse
nodes.accept visitor
end
end
{% end %}
end
end