lib/sparkql/lexer.rb in sparkql-1.2.1 vs lib/sparkql/lexer.rb in sparkql-1.2.2
- old
+ new
@@ -60,20 +60,30 @@
[:UNKNOWN, "ERROR: '#{self.string}'"]
end
token.freeze
end
-
+
def check_reserved_words(value)
u_value = value.capitalize
if OPERATORS.include?(u_value)
[:OPERATOR,u_value]
elsif RANGE_OPERATOR == u_value
[:RANGE_OPERATOR,u_value]
elsif CONJUNCTIONS.include?(u_value)
[:CONJUNCTION,u_value]
elsif UNARY_CONJUNCTIONS.include?(u_value)
[:UNARY_CONJUNCTION,u_value]
+ elsif ADD == u_value
+ [:ADD, u_value]
+ elsif SUB == u_value
+ [:SUB, u_value]
+ elsif MUL == u_value
+ [:MUL, u_value]
+ elsif DIV == u_value
+ [:DIV, u_value]
+ elsif MOD == u_value
+ [:MOD, u_value]
else
[:UNKNOWN, "ERROR: '#{self.string}'"]
end
end