Module: Yoga::Parser
- Defined in:
- lib/yoga/parser.rb,
lib/yoga/parser/helpers.rb
Overview
A parsing helper.
This uses the @tokens
and @_root
instance variables.
Defined Under Namespace
Modules: Helpers
Class Method Summary collapse
-
.included(base) ⇒ Object
private
Internal ruby construct.
Instance Method Summary collapse
-
#call ⇒ Yoga::Node
Performs the parsing.
-
#initialize(tokens) ⇒ Object
Initialize the parser.
Class Method Details
Instance Method Details
#call ⇒ Yoga::Node
Performs the parsing.
21 22 23 |
# File 'lib/yoga/parser.rb', line 21 def call @_root ||= parse_root end |
#initialize(tokens) ⇒ Object
Initialize the parser.
14 15 16 |
# File 'lib/yoga/parser.rb', line 14 def initialize(tokens) @tokens = tokens end |