Class: Loxxy::Ast::LoxGroupingExpr

Inherits:
LoxCompoundExpr show all
Defined in:
lib/loxxy/ast/lox_grouping_expr.rb

Instance Attribute Summary

Attributes inherited from LoxCompoundExpr

#subnodes

Attributes inherited from LoxNode

#position

Instance Method Summary collapse

Methods inherited from LoxNode

#done!

Constructor Details

#initialize(aPosition, subExpr) ⇒ LoxGroupingExpr

Returns a new instance of LoxGroupingExpr.

Parameters:

  • aPosition (Rley::Lexical::Position)

    Position of the entry in the input stream.

  • subExpr (Loxxy::Ast::LoxNode)


10
11
12
# File 'lib/loxxy/ast/lox_grouping_expr.rb', line 10

def initialize(aPosition, subExpr)
  super(aPosition, [subExpr])
end

Instance Method Details

#accept(visitor) ⇒ Object

Part of the 'visitee' role in Visitor design pattern.

Parameters:



16
17
18
# File 'lib/loxxy/ast/lox_grouping_expr.rb', line 16

def accept(visitor)
  visitor.visit_grouping_expr(self)
end