Ensure integer ranges are parsed correctly (#81)

This commit is contained in:
Finn Bear 2022-08-31 06:00:43 -07:00 committed by GitHub
parent 906b969b90
commit a9c6806745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ use crate::sql::comment::comment;
use crate::sql::error::IResult; use crate::sql::error::IResult;
use crate::sql::operator::{assigner, operator}; use crate::sql::operator::{assigner, operator};
use nom::branch::alt; use nom::branch::alt;
use nom::bytes::complete::tag;
use nom::character::complete::char; use nom::character::complete::char;
use nom::character::complete::multispace1; use nom::character::complete::multispace1;
use nom::combinator::eof; use nom::combinator::eof;
@ -19,6 +20,7 @@ pub fn number(i: &str) -> IResult<&str, ()> {
map(char('}'), |_| ()), map(char('}'), |_| ()),
map(char(';'), |_| ()), map(char(';'), |_| ()),
map(char(','), |_| ()), map(char(','), |_| ()),
map(tag(".."), |_| ()),
map(eof, |_| ()), map(eof, |_| ()),
)))(i) )))(i)
} }