store StringScanner in ParseContext and reuse it through parsing

This commit is contained in:
Michael Go
2025-01-07 14:32:45 -04:00
parent 002e4caea7
commit 7c592c1c00
18 changed files with 126 additions and 98 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
module Liquid
class Parser
def initialize(input)
@tokens = Lexer.tokenize(input)
def initialize(input, string_scanner)
@tokens = Lexer.tokenize(input, string_scanner)
@p = 0 # pointer to current location
end