lib/parslet/atoms/visitor.rb in parslet-1.1.1 vs lib/parslet/atoms/visitor.rb in parslet-1.2.0
- old
+ new
@@ -3,73 +3,73 @@
#
module Parslet::Atoms
class Base
def accept(visitor)
- raise NotImplementedError, "No visit method on #{self.class.name}."
+ raise NotImplementedError, "No #accept method on #{self.class.name}."
end
end
class Str
# Call back visitors #str method. See parslet/export for an example.
#
def accept(visitor)
- visitor.str(str)
+ visitor.visit_str(str)
end
end
class Entity
# Call back visitors #entity method. See parslet/export for an example.
#
def accept(visitor)
- visitor.entity(name, context, block)
+ visitor.visit_entity(name, block)
end
end
class Named
# Call back visitors #named method. See parslet/export for an example.
#
def accept(visitor)
- visitor.named(name, parslet)
+ visitor.visit_named(name, parslet)
end
end
class Sequence
# Call back visitors #sequence method. See parslet/export for an example.
#
def accept(visitor)
- visitor.sequence(parslets)
+ visitor.visit_sequence(parslets)
end
end
class Repetition
# Call back visitors #repetition method. See parslet/export for an example.
#
def accept(visitor)
- visitor.repetition(min, max, parslet)
+ visitor.visit_repetition(min, max, parslet)
end
end
class Alternative
# Call back visitors #alternative method. See parslet/export for an example.
#
def accept(visitor)
- visitor.alternative(alternatives)
+ visitor.visit_alternative(alternatives)
end
end
class Lookahead
# Call back visitors #lookahead method. See parslet/export for an example.
#
def accept(visitor)
- visitor.lookahead(positive, bound_parslet)
+ visitor.visit_lookahead(positive, bound_parslet)
end
end
class Re
# Call back visitors #re method. See parslet/export for an example.
#
def accept(visitor)
- visitor.re(match)
+ visitor.visit_re(match)
end
end
end