Class: Huml::Parser
- Inherits:
-
Treetop::Runtime::CompiledParser
- Object
- Treetop::Runtime::CompiledParser
- Huml::Parser
- Includes:
- Huml
- Defined in:
- lib/huml.rb
Constant Summary
Constants included from Huml
Instance Method Summary collapse
- #call(string) ⇒ Object
-
#initialize(options = {}) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(options = {}) ⇒ Parser
Returns a new instance of Parser.
10 11 12 |
# File 'lib/huml.rb', line 10 def initialize( = {}) super() end |
Instance Method Details
#call(string) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/huml.rb', line 14 def call(string) if result = parse(string) result.tokenize else raise Exception, self.failure_reason end end |