Class: RLSL::Prism::IR::Node
- Inherits:
-
Object
- Object
- RLSL::Prism::IR::Node
- Defined in:
- lib/rlsl/prism/ir/node.rb
Direct Known Subclasses
ArrayIndex, ArrayLiteral, Assignment, BinaryOp, Block, BoolLiteral, Break, Constant, FieldAccess, ForLoop, FuncCall, FunctionDefinition, GlobalDecl, IfStatement, Literal, MultipleAssignment, Parenthesized, Return, Swizzle, Ternary, UnaryOp, VarDecl, VarRef, WhileLoop
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/rlsl/prism/ir/node.rb', line 7 def type @type end |
Class Method Details
.visits(method_name) ⇒ Object
9 10 11 12 13 |
# File 'lib/rlsl/prism/ir/node.rb', line 9 def self.visits(method_name) define_method(:accept) do |visitor| visitor.public_send(method_name, self) end end |
Instance Method Details
#accept(_visitor) ⇒ Object
15 16 17 |
# File 'lib/rlsl/prism/ir/node.rb', line 15 def accept(_visitor) raise NotImplementedError end |