Class: SbuilderSexp::LValue
- Inherits:
-
Root
- Object
- Treetop::Runtime::SyntaxNode
- Root
- SbuilderSexp::LValue
- Includes:
- TlaParserS::LValue
- Defined in:
- lib/parser/parser_nodes.rb
Instance Method Summary collapse
-
#expression ⇒ AbstactExpression
For the LValue.
-
#expressions ⇒ Object
AbstractExpression.travers: no automatic traversal.
-
#lvalue_down ⇒ nil|RecordField
Implement traverse down for ‘recurse_lvalue’.
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
#expression ⇒ AbstactExpression
Returns for the LValue.
224 225 226 |
# File 'lib/parser/parser_nodes.rb', line 224 def expression recursive_select( SbuilderSexp::AbstactExpression).first end |
#expressions ⇒ Object
AbstractExpression.travers: no automatic traversal
219 220 221 |
# File 'lib/parser/parser_nodes.rb', line 219 def expressions nil end |
#lvalue_down ⇒ nil|RecordField
Implement traverse down for ‘recurse_lvalue’. In my case recurse ‘SbuilderSexp::UnitExpression’, which define record access by value or by name
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 |