@@ -18,11 +18,10 @@ class Lexer(object):
1818 ',' : 'comma' ,
1919 ':' : 'colon' ,
2020 '@' : 'current' ,
21- '&' : 'expref' ,
2221 '(' : 'lparen' ,
2322 ')' : 'rparen' ,
2423 '{' : 'lbrace' ,
25- '}' : 'rbrace'
24+ '}' : 'rbrace' ,
2625 }
2726
2827 def tokenize (self , expression ):
@@ -60,6 +59,8 @@ def tokenize(self, expression):
6059 yield self ._consume_raw_string_literal ()
6160 elif self ._current == '|' :
6261 yield self ._match_or_else ('|' , 'or' , 'pipe' )
62+ elif self ._current == '&' :
63+ yield self ._match_or_else ('&' , 'and' , 'expref' )
6364 elif self ._current == '`' :
6465 yield self ._consume_literal ()
6566 elif self ._current in self .START_NUMBER :
@@ -76,7 +77,7 @@ def tokenize(self, expression):
7677 elif self ._current == '>' :
7778 yield self ._match_or_else ('=' , 'gte' , 'gt' )
7879 elif self ._current == '!' :
79- yield self ._match_or_else ('=' , 'ne' , 'unknown ' )
80+ yield self ._match_or_else ('=' , 'ne' , 'not ' )
8081 elif self ._current == '=' :
8182 yield self ._match_or_else ('=' , 'eq' , 'unknown' )
8283 else :
0 commit comments