Class: SFRP::Flat::NodeRefExp
- Inherits:
-
Struct
- Object
- Struct
- SFRP::Flat::NodeRefExp
- Defined in:
- lib/sfrp/flat/expression.rb
Defined Under Namespace
Classes: NodeRef
Instance Attribute Summary collapse
-
#last ⇒ Object
Returns the value of attribute last.
-
#node_str ⇒ Object
Returns the value of attribute node_str.
-
#sp ⇒ Object
Returns the value of attribute sp.
Instance Method Summary collapse
- #alpha_convert(_table, _serial) ⇒ Object
- #lift_node_ref(collected_node_refs) ⇒ Object
- #to_poly ⇒ Object
Instance Attribute Details
#last ⇒ Object
Returns the value of attribute last
35 36 37 |
# File 'lib/sfrp/flat/expression.rb', line 35 def last @last end |
#node_str ⇒ Object
Returns the value of attribute node_str
35 36 37 |
# File 'lib/sfrp/flat/expression.rb', line 35 def node_str @node_str end |
#sp ⇒ Object
Returns the value of attribute sp
35 36 37 |
# File 'lib/sfrp/flat/expression.rb', line 35 def sp @sp end |
Instance Method Details
#alpha_convert(_table, _serial) ⇒ Object
46 47 48 |
# File 'lib/sfrp/flat/expression.rb', line 46 def alpha_convert(_table, _serial) self end |
#lift_node_ref(collected_node_refs) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/sfrp/flat/expression.rb', line 38 def lift_node_ref(collected_node_refs) node_ref = NodeRef.new(node_str, last) unless collected_node_refs.include?(node_ref) collected_node_refs << node_ref end VarRefExp.new("__node_ref_#{collected_node_refs.index(node_ref)}", sp) end |
#to_poly ⇒ Object
50 51 52 |
# File 'lib/sfrp/flat/expression.rb', line 50 def to_poly raise NodeRefInIllegalPositionError.new(node_str) end |