Class: Pegarus::Any

Inherits:
Pattern show all
Defined in:
lib/pegarus/ast/any.rb,
lib/pegarus/rubinius/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pattern

#*, #+, #+@, #-, #-@, #/, engine, #graph, #match, select_engine

Constructor Details

#initialize(count) ⇒ Any

Returns a new instance of Any.



5
6
7
# File 'lib/pegarus/ast/any.rb', line 5

def initialize(count)
  @count = count
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



3
4
5
# File 'lib/pegarus/ast/any.rb', line 3

def count
  @count
end

Instance Method Details

#bytecode(g) ⇒ Object



139
140
141
# File 'lib/pegarus/rubinius/compiler.rb', line 139

def bytecode(g)
  any g, @count
end

#visit(visitor) ⇒ Object



9
10
11
# File 'lib/pegarus/ast/any.rb', line 9

def visit(visitor)
  visitor.any self
end