Class: Atomy::Code::Pattern
- Defined in:
- lib/atomy/code/pattern.rb,
lib/atomy/code/pattern/and.rb,
lib/atomy/code/pattern/splat.rb,
lib/atomy/code/pattern/wildcard.rb,
lib/atomy/code/pattern/quasi_quote.rb
Direct Known Subclasses
Defined Under Namespace
Classes: And, QuasiQuote, Splat, Wildcard
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#assign(gen) ⇒ Object
- value, pattern
-
on stack.
- #bytecode(gen, mod) ⇒ Object
-
#initialize(node) ⇒ Pattern
constructor
A new instance of Pattern.
- #splat? ⇒ Boolean
Constructor Details
#initialize(node) ⇒ Pattern
Returns a new instance of Pattern.
6 7 8 |
# File 'lib/atomy/code/pattern.rb', line 6 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
4 5 6 |
# File 'lib/atomy/code/pattern.rb', line 4 def node @node end |
Instance Method Details
#assign(gen) ⇒ Object
- value, pattern
-
on stack
15 16 |
# File 'lib/atomy/code/pattern.rb', line 15 def assign(gen) end |
#bytecode(gen, mod) ⇒ Object
10 11 12 |
# File 'lib/atomy/code/pattern.rb', line 10 def bytecode(gen, mod) mod.compile(gen, @node) end |
#splat? ⇒ Boolean
18 19 20 |
# File 'lib/atomy/code/pattern.rb', line 18 def splat? false end |