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 LoxCompoundExpr

#accept

Methods inherited from LoxNode

#accept, #done!

Methods included from ASTVisitee

#define_accept, #snake_case

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.flatten
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