Class: Sliq::Parser
- Inherits:
-
Slim::Parser
- Object
- Slim::Parser
- Sliq::Parser
- Defined in:
- lib/sliq.rb
Instance Method Summary collapse
Instance Method Details
#parse_liquid_tag(name) ⇒ Object
26 27 28 29 30 |
# File 'lib/sliq.rb', line 26 def parse_liquid_tag(name) block = [:multi] @stacks.last << [:liquid, :tag, name, @line.strip, block] @stacks << block end |
#unknown_line_indicator ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sliq.rb', line 12 def unknown_line_indicator case @line when /\A%\s*(\w+)/ @line = $' parse_liquid_tag($1) when /\A\{/ block = [:multi] @stacks.last << [:multi, [:slim, :interpolate, @line], block] @stacks << block else super end end |