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
end
CONSUME_TOKENS = [:string, :number].freeze
private_constant :CONSUME_TOKENS
SINGLE_TOKEN_EXPRESSION_TYPES = [:string, :number].freeze
private_constant :SINGLE_TOKEN_EXPRESSION_TYPES
def expression
token = @tokens[@p]
if token[0] == :id
variable_signature
elsif CONSUME_TOKENS.include? token[0]
elsif SINGLE_TOKEN_EXPRESSION_TYPES.include? token[0]
consume
elsif token.first == :open_round
consume