Class: Flott::Parser::Mode
- Inherits:
-
Object
- Object
- Flott::Parser::Mode
- Defined in:
- lib/flott.rb
Overview
The base parsing mode.
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
The parser this mode belongs to.
Instance Method Summary collapse
-
#initialize(parser) ⇒ Mode
constructor
Creates a parsing mode for parser.
-
#scanner ⇒ Object
The parsing mode uses this StringScanner instance for it’s job, its the StringScanner of the current parser.
-
#state ⇒ Object
A shortcut to reach the shared state of all the parsers involved in parsing the current template.
Constructor Details
#initialize(parser) ⇒ Mode
Creates a parsing mode for parser.
790 791 792 |
# File 'lib/flott.rb', line 790 def initialize(parser) @parser = parser end |
Instance Attribute Details
#parser ⇒ Object (readonly)
The parser this mode belongs to.
795 796 797 |
# File 'lib/flott.rb', line 795 def parser @parser end |
Instance Method Details
#scanner ⇒ Object
The parsing mode uses this StringScanner instance for it’s job, its the StringScanner of the current parser.
799 800 801 |
# File 'lib/flott.rb', line 799 def scanner @parser.scanner end |
#state ⇒ Object
A shortcut to reach the shared state of all the parsers involved in parsing the current template.
805 806 807 |
# File 'lib/flott.rb', line 805 def state @parser.state end |