Class: C::IndirectType
- Inherits:
-
Type
show all
- Defined in:
- lib/cast/c_nodes.rb,
lib/cast/c_nodes.rb
Constant Summary
Constants inherited
from Node
Node::INSPECT_TAB
Instance Attribute Summary
Attributes inherited from Node
#parent, #pos, #subclasses
Instance Method Summary
collapse
Methods inherited from Type
parse
Methods inherited from Node
#==, #=~, abstract, add_field, #assert_invariants, #attached?, child, #clone, #depth_first, #detach, #detached?, #dup, #each, #eql?, field, #fields, fields, #hash, inherited, initializer, #insert_next, #insert_prev, #inspect, inspect1, #list_next, #list_prev, #match?, #method_missing, new_at, #next, #node_after, #node_before, #postorder, #preorder, #prev, #remove_node, #replace_node, #replace_with, #reverse_depth_first, #reverse_each, #reverse_postorder, #reverse_preorder, subclasses_recursive, #swap_with
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class C::Node
Instance Method Details
#direct_type ⇒ Object
745
746
747
748
749
750
751
|
# File 'lib/cast/c_nodes.rb', line 745
def direct_type
if type.is_a? IndirectType
type.direct_type
else
type
end
end
|
#direct_type=(val) ⇒ Object
752
753
754
755
756
757
758
|
# File 'lib/cast/c_nodes.rb', line 752
def direct_type=(val)
if type.is_a? IndirectType
type.direct_type = val
else
self.type = val
end
end
|
#indirect_type ⇒ Object
759
760
761
762
763
764
765
766
767
|
# File 'lib/cast/c_nodes.rb', line 759
def indirect_type
ret = self.clone
t = ret
while t.type.is_a? IndirectType
t = t.type
end
t.type = nil
return ret
end
|