Class: Chelsy::Operator::Call

Inherits:
Postfix show all
Defined in:
lib/chelsy/ast.rb

Overview

=== 6.5.2.2 Function calls

Instance Attribute Summary collapse

Attributes inherited from Unary

#operand

Attributes inherited from Element

#fragments, #post_fragments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

precedence

Constructor Details

#initialize(callee, args, **rest) ⇒ Call

Returns a new instance of Call.



608
609
610
611
612
# File 'lib/chelsy/ast.rb', line 608

def initialize(callee, args, **rest)
  @args = args.map {|a| Syntax::Expr.ensure(a) }

  super callee, **rest
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



604
605
606
# File 'lib/chelsy/ast.rb', line 604

def args
  @args
end

Class Method Details

.operatorObject



606
# File 'lib/chelsy/ast.rb', line 606

def self.operator; :"()" end

Instance Method Details

#calleeObject



614
# File 'lib/chelsy/ast.rb', line 614

def callee; operand end