Add && + || as alternatives for AND + OR in SQL

This commit is contained in:
Tobie Morgan Hitchcock 2016-11-04 10:03:07 +00:00
parent e0bcd5ff37
commit 6e4a229a96

View file

@ -128,6 +128,22 @@ func (s *scanner) scan() (tok Token, lit string, val interface{}) {
return NONECONTAINEDIN, string(ch), val
case '#':
return s.scanCommentSingle(ch)
case '|':
chn := s.next()
switch {
case chn == '|':
return OR, "OR", val
default:
s.undo()
}
case '&':
chn := s.next()
switch {
case chn == '&':
return AND, "AND", val
default:
s.undo()
}
case '/':
chn := s.next()
switch {