Class: SbuilderSexp::FieldByName

Inherits:
FieldBy show all
Includes:
TlaParserS::LValue
Defined in:
lib/parser/parser_nodes.rb

Instance Method Summary collapse

Methods included from TlaParserS::LValue

#default_lvalue, #lvalue, #recurse_lvalue

Methods inherited from FieldBy

#lhs_node, #rhs_node

Methods inherited from AbstactExpression

#expression_postfix, #expression_prefix, #expressions, #has_rhs, #lhs_node, #node_value, #rhs_node, #traverse

Methods inherited from Treetop::Runtime::SyntaxNode

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

Instance Method Details

#expression_valObject



748
749
750
# File 'lib/parser/parser_nodes.rb', line 748

def expression_val
  field_name_expression && field_name_expression.expression_val
end

#field_name_expressionAbstactExpression

Returns defining the name.

Returns:



744
745
746
# File 'lib/parser/parser_nodes.rb', line 744

def field_name_expression
  recursive_select( SbuilderSexp::AbstactExpression ).first
end

#lvalue_downObject



754
755
756
757
758
759
# File 'lib/parser/parser_nodes.rb', line 754

def lvalue_down
  down = recursive_select( SbuilderSexp::UnitExpression ).first
  # down = recursive_select( SbuilderSexp::RecordField ).first
  # return nil unless down
  # down.recursive_select( SbuilderSexp::RecordField ).first
end

#name_expressionObject



736
737
738
# File 'lib/parser/parser_nodes.rb', line 736

def name_expression
  elements[0]
end