small stuff
This commit is contained in:
+15
-1
@@ -1,3 +1,17 @@
|
|||||||
|
mod lexer; // Import the lexer module
|
||||||
|
|
||||||
|
use lexer::lexer::Lexer; // Import the Lexer struct
|
||||||
|
use lexer::lexer::Token; // Import the Token enum
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
let input = "3 + 4 * (10 - 2)";
|
||||||
|
let mut lexer = Lexer::new(input);
|
||||||
|
|
||||||
|
loop {
|
||||||
|
let token = lexer.next_token();
|
||||||
|
println!("{:?}", token);
|
||||||
|
if token == Token::EOF {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
-7
@@ -1,7 +0,0 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
version = 3
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wisp"
|
|
||||||
version = "0.1.0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "wisp"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
mod lexer; // Import the lexer module
|
|
||||||
|
|
||||||
use lexer::lexer::Lexer; // Import the Lexer struct
|
|
||||||
use lexer::lexer::Token; // Import the Token enum
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let input = "3 + 4 * (10 - 2)";
|
|
||||||
let mut lexer = Lexer::new(input);
|
|
||||||
|
|
||||||
loop {
|
|
||||||
let token = lexer.next_token();
|
|
||||||
println!("{:?}", token);
|
|
||||||
if token == Token::EOF {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Signature: 8a477f597d28d172789f06886806bc55
|
|
||||||
# This file is a cache directory tag created by cargo.
|
|
||||||
# For information about cache directory tags see https://bford.info/cachedir/
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
C:\Users\charlie\Desktop\projects\wisp\wisp\target\debug\deps\libwisp-028a7a1f0b66b9bd.rmeta: src\main.rs src\lexer\mod.rs src\lexer\lexer.rs
|
|
||||||
|
|
||||||
C:\Users\charlie\Desktop\projects\wisp\wisp\target\debug\deps\wisp-028a7a1f0b66b9bd.d: src\main.rs src\lexer\mod.rs src\lexer\lexer.rs
|
|
||||||
|
|
||||||
src\main.rs:
|
|
||||||
src\lexer\mod.rs:
|
|
||||||
src\lexer\lexer.rs:
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
C:\Users\charlie\Desktop\projects\wisp\wisp\target\debug\deps\wisp.exe: src\main.rs src\lexer\mod.rs src\lexer\lexer.rs
|
|
||||||
|
|
||||||
C:\Users\charlie\Desktop\projects\wisp\wisp\target\debug\deps\wisp.d: src\main.rs src\lexer\mod.rs src\lexer\lexer.rs
|
|
||||||
|
|
||||||
src\main.rs:
|
|
||||||
src\lexer\mod.rs:
|
|
||||||
src\lexer\lexer.rs:
|
|
||||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
C:\Users\charlie\Desktop\projects\wisp\wisp\target\debug\wisp.exe: C:\Users\charlie\Desktop\projects\wisp\wisp\src\lexer\lexer.rs C:\Users\charlie\Desktop\projects\wisp\wisp\src\lexer\mod.rs C:\Users\charlie\Desktop\projects\wisp\wisp\src\main.rs
|
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user