We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2a6efb commit 5df3f52Copy full SHA for 5df3f52
sqlglot/parser.py
@@ -777,7 +777,7 @@ class Parser(metaclass=_Parser):
777
TokenType.PARAMETER: lambda self: self._parse_parameter(),
778
TokenType.COLON: lambda self: (
779
self.expression(exp.Placeholder, this=self._prev.text)
780
- if self._match(TokenType.NUMBER) or self._match_set(self.ID_VAR_TOKENS)
+ if self._match_set(self.ID_VAR_TOKENS)
781
else None
782
),
783
}
tests/fixtures/identity.sql
@@ -53,6 +53,7 @@ x >> 1 | 1 & 1 ^ 1
53
x || y
54
x[ : ]
55
x[1 : ]
56
+x[ : 2]
57
x[1 : 2]
58
x[-4 : -1]
59
1 - -1
0 commit comments