mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
more micro optimization
This commit is contained in:
@@ -49,6 +49,16 @@ module Liquid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def next_token
|
def next_token
|
||||||
|
if @ss.pos == 0
|
||||||
|
if @ss.string.start_with?("{{")
|
||||||
|
return next_variable_token
|
||||||
|
elsif @ss.string.start_with?("{%")
|
||||||
|
return next_tag_token
|
||||||
|
else
|
||||||
|
return next_text_token
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# possible states: :text, :tag, :variable
|
# possible states: :text, :tag, :variable
|
||||||
byte_a = @ss.scan_byte
|
byte_a = @ss.scan_byte
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user