Module: JPTGRAMMAR::FunctionExpr3

Defined in:
lib/parser/jptgrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



3745
3746
3747
3748
3749
3750
3751
3752
# File 'lib/parser/jptgrammar.rb', line 3745

def ast
  args = []
  if opt = elements[3].elements
    args = [opt[0].ast,
            *(opt[1].elements.map(&:function_argument).map(&:ast))]
  end
  ["func", function_name.text_value, *args]
end