Rename constant to SINGLE_TOKEN_EXPRESSION_TYPES

This commit is contained in:
Ashwin Maroli
2019-05-17 23:30:24 +05:30
committed by GitHub
parent 9ef6f9b642
commit 2c42447659
+3 -3
View File
@@ -44,14 +44,14 @@ module Liquid
tok[0] == type tok[0] == type
end end
CONSUME_TOKENS = [:string, :number].freeze SINGLE_TOKEN_EXPRESSION_TYPES = [:string, :number].freeze
private_constant :CONSUME_TOKENS private_constant :SINGLE_TOKEN_EXPRESSION_TYPES
def expression def expression
token = @tokens[@p] token = @tokens[@p]
if token[0] == :id if token[0] == :id
variable_signature variable_signature
elsif CONSUME_TOKENS.include? token[0] elsif SINGLE_TOKEN_EXPRESSION_TYPES.include? token[0]
consume consume
elsif token.first == :open_round elsif token.first == :open_round
consume consume