Skip to content

Commit

Permalink
fix symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed May 11, 2024
1 parent f808668 commit 347b259
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/compiler/token.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::{Context, ValuePool};
use crate::compiler::{token, CompilerImpl};
use crate::compiler::CompilerImpl;
use libcore::*;
use logos::{Lexer, Logos, Skip, Source};
use logos::{Lexer, Logos, Source};
use rust_i18n::t;
use std::{cell::RefCell, fmt::Display, rc::Rc, u8};
use std::{cell::RefCell, fmt::Display, rc::Rc};

fn add_float(lex: &mut Lexer<Token>) -> usize {
// println!("{}", lex.slice());
Expand Down Expand Up @@ -184,18 +184,15 @@ pub enum Token {
#[token("^=")]
SelfXor,
#[regex(
r#"[+-]?(0[bB][01_]+|0[oO][0-7_]+|0[xX][0-9a-fA-F_]+|[0-9][0-9_]*)"#,
r#"(0[bB][01_]+|0[oO][0-7_]+|0[xX][0-9a-fA-F_]+|[0-9][0-9_]*)"#,
convert_int
)]
IntValue(usize),
#[regex(r#""[^"]*""#, add_string)]
// #[regex(r#""""(.)*""""#, add_string)]
// TODO:MULT
StringValue(usize),
#[regex(
r#"([-+]?)((\d+)\.(\d+))|(((\d+)|(\d+\.\d+))[eE][-+]?\d+)?"#,
add_float
)]
#[regex(r#"((\d+)\.(\d+))|(((\d+)|(\d+\.\d+))[eE][-+]?\d+)?"#, add_float)]
FloatValue(usize),
LongIntValue,
#[regex(r#"'[^']*'"#, convert_char)]
Expand Down

0 comments on commit 347b259

Please sign in to comment.