Add ExpressionParser and ExpressionConsumer

This commit is contained in:
Guilherme Carreiro
2025-10-27 16:33:31 +01:00
committed by Guilherme Carreiro
parent 6a9e46dd19
commit 1bff382ebc
7 changed files with 773 additions and 1 deletions
+6
View File
@@ -2,6 +2,8 @@
module Liquid
class Parser
attr_reader :tokens
def initialize(input)
ss = input.is_a?(StringScanner) ? input : StringScanner.new(input)
@tokens = Lexer.tokenize(ss)
@@ -82,6 +84,10 @@ module Liquid
str
end
def point
@p
end
def variable_lookups
str = +""
loop do