Class: SbuilderSexp::LValue

Inherits:
Root 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 Treetop::Runtime::SyntaxNode

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

Instance Method Details

#expressionAbstactExpression

Returns for the LValue.

Returns:



224
225
226
# File 'lib/parser/parser_nodes.rb', line 224

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

#expressionsObject

AbstractExpression.travers: no automatic traversal



219
220
221
# File 'lib/parser/parser_nodes.rb', line 219

def expressions
  nil
end

#lvalue_downnil|RecordField

Implement traverse down for ‘recurse_lvalue’. In my case recurse ‘SbuilderSexp::UnitExpression’, which define record access by value or by name

Returns:



235
236
237
238
239
240
# File 'lib/parser/parser_nodes.rb', line 235

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