Fix integer reading

This commit is contained in:
Apache 2024-06-12 19:26:02 -05:00
parent b51ace40df
commit c14385a7f8
Signed by: apache
GPG key ID: 6B10F3EAF14F4C77
4 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,6 @@ impl LispState {
}
pub fn execute(&self, instructions: Vec<OpCode>) {
println!("{:?}", instructions);
for op in instructions {
match op {
OpCode::Call(func, args) => {

View file

@ -17,6 +17,7 @@ fn main() {
Vec::new()
}
};
println!("{:?}", tokens);
let instructions = parse(tokens);
let state = LispState::new();

View file

@ -1,5 +1,3 @@
; This is a comment
(print "Hello, World")
(print (add 1 2))
(print (add 1333 12423))

View file

@ -106,6 +106,8 @@ impl Tokenizer {
tokens.push(Token::Integer(self.storage.iter().collect::<String>().parse().unwrap()));
self.storage.clear();
}
self.storage.push(char);
}
if self.reading_string {