Compare commits
4 Commits
a66ed69e25
...
162b748d3e
Author | SHA1 | Date | |
---|---|---|---|
162b748d3e | |||
9777711277 | |||
8f228a06ce | |||
3eeae06477 |
@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
rush_macro = { path = "rush_macro" }
|
||||||
rand = "0.9.0"
|
rand = "0.9.0"
|
||||||
paste = "1.0.15"
|
paste = "1.0.15"
|
||||||
rust_decimal = { version = "1.37", features = ["macros", "maths"] }
|
rust_decimal = { version = "1.37", features = ["macros", "maths"] }
|
||||||
|
13
rush_macro/Cargo.toml
Normal file
13
rush_macro/Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[package]
|
||||||
|
name = "rush_macro"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
# wait to add this until later bc Rust errors
|
||||||
|
# until it works.
|
||||||
|
#[lib]
|
||||||
|
#proc-macro = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
syn = { version = "2.0.100" } # rust code from string -> data structure
|
||||||
|
quote = { version = "1.0.40" } # syn data structures to rust code
|
9
rush_macro/src/lib.rs
Normal file
9
rush_macro/src/lib.rs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
assert_eq!(true, true);
|
||||||
|
}
|
||||||
|
}
|
@ -275,7 +275,7 @@ pub mod vector;
|
|||||||
|
|
||||||
// unsure how to procedurally read a file and put all functions
|
// unsure how to procedurally read a file and put all functions
|
||||||
// into a vector. Probably need to use procedural macros, but I'm not there yet.
|
// into a vector. Probably need to use procedural macros, but I'm not there yet.
|
||||||
pub fn int_instructions() -> Vec<fn(&mut PushState)> {
|
/*pub fn int_instructions() -> Vec<fn(&mut PushState)> {
|
||||||
vec![
|
vec![
|
||||||
// numeric.rs
|
// numeric.rs
|
||||||
int_add,
|
int_add,
|
||||||
@ -657,4 +657,4 @@ pub fn code_instructions() -> Vec<fn(&mut PushState)> {
|
|||||||
code_from_vector_char,
|
code_from_vector_char,
|
||||||
code_from_exec,
|
code_from_exec,
|
||||||
]
|
]
|
||||||
}
|
}*/
|
||||||
|
@ -7,7 +7,7 @@ mod push;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// These need to stay so linter doesn't go crazy.
|
// These need to stay so linter doesn't go crazy.
|
||||||
int_instructions();
|
/* int_instructions();
|
||||||
float_instructions();
|
float_instructions();
|
||||||
string_instructions();
|
string_instructions();
|
||||||
boolean_instructions();
|
boolean_instructions();
|
||||||
@ -18,7 +18,7 @@ fn main() {
|
|||||||
vector_boolean_instructions();
|
vector_boolean_instructions();
|
||||||
vector_char_instructions();
|
vector_char_instructions();
|
||||||
exec_instructions();
|
exec_instructions();
|
||||||
code_instructions();
|
code_instructions();*/
|
||||||
let mut empty_state = EMPTY_STATE;
|
let mut empty_state = EMPTY_STATE;
|
||||||
interpret_program(&mut empty_state, 1000, 1000);
|
interpret_program(&mut empty_state, 1000, 1000);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user