Class: SbuilderSexp::FieldByName
- Inherits:
-
FieldBy
- Object
- Treetop::Runtime::SyntaxNode
- Root
- AbstactExpression
- FieldBy
- SbuilderSexp::FieldByName
- Includes:
- TlaParserS::LValue
- Defined in:
- lib/parser/parser_nodes.rb
Instance Method Summary collapse
- #expression_val ⇒ Object
-
#field_name_expression ⇒ AbstactExpression
Defining the name.
- #lvalue_down ⇒ Object
- #name_expression ⇒ Object
Methods included from TlaParserS::LValue
#default_lvalue, #lvalue, #recurse_lvalue
Methods inherited from FieldBy
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_val ⇒ Object
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_expression ⇒ AbstactExpression
Returns defining the name.
744 745 746 |
# File 'lib/parser/parser_nodes.rb', line 744 def field_name_expression recursive_select( SbuilderSexp::AbstactExpression ).first end |
#lvalue_down ⇒ Object
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_expression ⇒ Object
736 737 738 |
# File 'lib/parser/parser_nodes.rb', line 736 def name_expression elements[0] end |