Class: Pegarus::Character
- Defined in:
- lib/pegarus/ast/character.rb,
lib/pegarus/rubinius/compiler.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
Returns the value of attribute string.
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(string) ⇒ Character
constructor
A new instance of Character.
- #visit(visitor) ⇒ Object
Methods inherited from Pattern
#*, #+, #+@, #-, #-@, #/, engine, #graph, #match, select_engine
Constructor Details
#initialize(string) ⇒ Character
Returns a new instance of Character.
5 6 7 |
# File 'lib/pegarus/ast/character.rb', line 5 def initialize(string) @string = string end |
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
3 4 5 |
# File 'lib/pegarus/ast/character.rb', line 3 def string @string end |
Instance Method Details
#bytecode(g) ⇒ Object
145 146 147 |
# File 'lib/pegarus/rubinius/compiler.rb', line 145 def bytecode(g) char g, @string end |
#visit(visitor) ⇒ Object
9 10 11 |
# File 'lib/pegarus/ast/character.rb', line 9 def visit(visitor) visitor.character self end |