Class: SbuilderSexp::Called

Inherits:
UnlabeledStatement show all
Defined in:
lib/parser/parser_nodes.rb

Direct Known Subclasses

Call, MacroCall

Instance Method Summary collapse

Methods inherited from UnlabeledStatement

#statement_label

Methods inherited from Statement

#find_labelnode, #get_statement, #node_value, #statement_label, #statements, #traverse

Methods inherited from Treetop::Runtime::SyntaxNode

#node_type, #node_value, #recursive_inject, #recursive_inject_parent, #recursive_select, #value

Instance Method Details

#actual_parametersArray

Returns actual parameters parsed as ‘Expression’ nodes.

Returns:

  • (Array)

    actual parameters parsed as ‘Expression’ nodes



1045
1046
1047
# File 'lib/parser/parser_nodes.rb', line 1045

def actual_parameters
  recursive_select( SbuilderSexp::Expression)
end

#calledObject



1036
1037
1038
# File 'lib/parser/parser_nodes.rb', line 1036

def called
  recursive_select( SbuilderSexp::Identifier).map{ |r| r.node_value }.first      
end

#statement_valObject



1040
1041
1042
# File 'lib/parser/parser_nodes.rb', line 1040

def statement_val
  "call #{called}"
end