Class: IV::Phonic::AST::FunctionCall
- Inherits:
-
Expression
- Object
- Node
- Expression
- IV::Phonic::AST::FunctionCall
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary collapse
-
#initialize(parent, expr) ⇒ FunctionCall
constructor
A new instance of FunctionCall.
- #to_source ⇒ Object
Methods inherited from Expression
Methods inherited from Node
#begin_position, #end_position, #program, #source
Constructor Details
#initialize(parent, expr) ⇒ FunctionCall
Returns a new instance of FunctionCall.
509 510 511 512 513 |
# File 'lib/iv/phonic/ast.rb', line 509 def initialize parent, expr super parent, expr @target = Expression.as self, expr[:target] @args = expr[:args].map{|arg| Expression.as self, arg } end |
Instance Method Details
#to_source ⇒ Object
515 516 517 |
# File 'lib/iv/phonic/ast.rb', line 515 def to_source "#{@target.to_source}(#{args.map{|arg| arg.to_source }.join(', ')})" end |