From 843242e692280d604b74324ba26ead6158223439 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Sun, 10 May 2026 12:54:41 +0300 Subject: Remove Float from parser Dropped to make the language simpler. --- compiler/src/ast/error.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'compiler/src/ast/error.rs') diff --git a/compiler/src/ast/error.rs b/compiler/src/ast/error.rs index 8117513..38b3916 100644 --- a/compiler/src/ast/error.rs +++ b/compiler/src/ast/error.rs @@ -1,13 +1,8 @@ -use std::{ - error, fmt, - num::{ParseFloatError, ParseIntError}, - rc::Rc, -}; +use std::{error, fmt, num::ParseIntError, rc::Rc}; #[derive(Clone, Debug, PartialEq, Eq)] pub enum Error { // Number - InvalidFloatLiteral(Rc, ParseFloatError), InvalidIntegerLiteral(Rc, ParseIntError), // String @@ -26,9 +21,6 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - Error::InvalidFloatLiteral(number, err) => { - write!(f, "invalid float literal {number}: {err}") - } Error::InvalidIntegerLiteral(number, err) => { write!(f, "invalid integer literal {number}: {err}") } -- cgit v1.3