Class: SbuilderSexp::RecordField

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

Direct Known Subclasses

RecordFieldName

Instance Method Summary collapse

Methods included from TlaParserS::LValue

#default_lvalue, #lvalue, #recurse_lvalue

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

AbstactExpression.traverse calls once: collect rec.id.field, expression value is the lvalue



570
571
572
573
# File 'lib/parser/parser_nodes.rb', line 570

def expression_val
  # return A, A.b, A.b[c]
  recurse_lvalue
end

#lvalue_downnil|RecordField

Implement traversal for ‘recurse_lvalue’

Returns:



555
556
557
558
559
# File 'lib/parser/parser_nodes.rb', line 555

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