mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
more micro optimization
This commit is contained in:
@@ -49,6 +49,16 @@ module Liquid
|
||||
end
|
||||
|
||||
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
|
||||
byte_a = @ss.scan_byte
|
||||
|
||||
|
||||
Reference in New Issue
Block a user