store is_negative for all number literals in the parse ast

This commit is contained in:
Folkert 2021-03-12 16:11:46 +01:00
parent 866fa14590
commit 182fd5201d
12 changed files with 142 additions and 46 deletions

View file

@ -101,10 +101,10 @@ pub fn desugar_def<'a>(arena: &'a Bump, def: &'a Def<'a>) -> Def<'a> {
/// then replace the BinOp nodes with Apply nodes. Also drop SpaceBefore and SpaceAfter nodes.
pub fn desugar_expr<'a>(arena: &'a Bump, loc_expr: &'a Located<Expr<'a>>) -> &'a Located<Expr<'a>> {
match &loc_expr.value {
Float(_)
| Nested(Float(_))
| Num(_)
| Nested(Num(_))
Float { .. }
| Nested(Float { .. })
| Num { .. }
| Nested(Num { .. })
| NonBase10Int { .. }
| Nested(NonBase10Int { .. })
| Str(_)