Add binary literals (#4680)

This commit is contained in:
JT
2022-02-28 18:31:53 -05:00
committed by GitHub
parent e3100e6afd
commit a6a96b29cb
15 changed files with 199 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ pub enum FlatShape {
Garbage,
Nothing,
Bool,
Binary,
Int,
Float,
Range,
@@ -35,6 +36,7 @@ impl Display for FlatShape {
match self {
FlatShape::Garbage => write!(f, "shape_garbage"),
FlatShape::Nothing => write!(f, "shape_nothing"),
FlatShape::Binary => write!(f, "shape_binary"),
FlatShape::Bool => write!(f, "shape_bool"),
FlatShape::Int => write!(f, "shape_int"),
FlatShape::Float => write!(f, "shape_float"),
@@ -189,6 +191,9 @@ pub fn flatten_expression(
Expr::DateTime(_) => {
vec![(expr.span, FlatShape::DateTime)]
}
Expr::Binary(_) => {
vec![(expr.span, FlatShape::Binary)]
}
Expr::Int(_) => {
vec![(expr.span, FlatShape::Int)]
}