lib/loxxy/ast/lox_binary_expr.rb in loxxy-0.0.13 vs lib/loxxy/ast/lox_binary_expr.rb in loxxy-0.0.14

- old
+ new

@@ -14,9 +14,15 @@ def initialize(aPosition, anOperator, operand1, operand2) super(aPosition, [operand1, operand2]) @operator = anOperator end + # Part of the 'visitee' role in Visitor design pattern. + # @param visitor [Ast::ASTVisitor] the visitor + def accept(visitor) + visitor.visit_binary_expr(self) + end + alias operands subnodes end # class end # module end # module