Class: Loxxy::Ast::LoxCallExpr

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

Instance Attribute Summary collapse

Attributes inherited from LoxCompoundExpr

#subnodes

Attributes inherited from LoxNode

#position

Instance Method Summary collapse

Methods inherited from LoxNode

#done!

Constructor Details

#initialize(aPosition, argList) ⇒ LoxCallExpr

Returns a new instance of LoxCallExpr.

Parameters:

  • aPosition (Rley::Lexical::Position)

    Position of the entry in the input stream.

  • argList (Array<Loxxy::Ast::LoxNode>)


13
14
15
16
# File 'lib/loxxy/ast/lox_call_expr.rb', line 13

def initialize(aPosition, argList)
  super(aPosition, [])
  @arguments = argList
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



9
10
11
# File 'lib/loxxy/ast/lox_call_expr.rb', line 9

def arguments
  @arguments
end

#calleeObject

Returns the value of attribute callee.



8
9
10
# File 'lib/loxxy/ast/lox_call_expr.rb', line 8

def callee
  @callee
end

Instance Method Details

#accept(visitor) ⇒ Object

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

Parameters:



20
21
22
# File 'lib/loxxy/ast/lox_call_expr.rb', line 20

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