Skip to content

Commit

Permalink
Add pi and C for speed of light
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeRoggenbuck committed Sep 5, 2024
1 parent 64b48cb commit 2034010
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod lexer;
pub mod parse;

fn interactive() {
let verbose = true;
let verbose = false;

let mut local_memory = HashMap::new();

Expand All @@ -20,6 +20,22 @@ fn interactive() {
},
);

local_memory.insert(
"pi".to_string(),
Token {
token_type: TokenType::NumericDecLiteral,
value: std::f64::consts::PI.to_string(),
},
);

local_memory.insert(
"C".to_string(),
Token {
token_type: TokenType::NumericIntLiteral,
value: "299792458".to_string(),
},
);

loop {
print!("{}", color!(Color::GREEN, bold!("\n> ").as_str()));
stdout().flush().expect("Failed to flush stdout");
Expand Down

0 comments on commit 2034010

Please sign in to comment.