Ensure full duration values are parsed correctly
This commit is contained in:
parent
05d4d97707
commit
de925ae16e
2 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ func TestDefine(t *testing.T) {
|
|||
|
||||
txt := `
|
||||
USE NS test DB test;
|
||||
DEFINE SCOPE test SESSION 1h
|
||||
DEFINE SCOPE test SESSION 1h0m0s
|
||||
SIGNUP AS (
|
||||
IF $ip IN ["127.0.0.1", "213.172.165.134"] THEN
|
||||
(CREATE user SET email=$user, pass=bcrypt.generate($pass))
|
||||
|
|
|
@ -748,7 +748,7 @@ func (s *scanner) scanNumber(chp ...rune) (tok Token, lit string, val interface{
|
|||
} else if isNumber(ch) {
|
||||
buf.WriteRune(ch)
|
||||
} else if isLetter(ch) {
|
||||
if tok == NUMBER || tok == DOUBLE {
|
||||
if tok == NUMBER || tok == DOUBLE || tok == DURATION {
|
||||
tok = IDENT
|
||||
buf.WriteRune(ch)
|
||||
switch ch {
|
||||
|
|
Loading…
Reference in a new issue