diff --git a/src/executor.rs b/src/executor.rs index dfa1a2d..4c1febf 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -78,7 +78,6 @@ impl LispState { } pub fn execute(&self, instructions: Vec) { - println!("{:?}", instructions); for op in instructions { match op { OpCode::Call(func, args) => { diff --git a/src/main.rs b/src/main.rs index 3e1bf0c..802ed59 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ fn main() { Vec::new() } }; + println!("{:?}", tokens); let instructions = parse(tokens); let state = LispState::new(); diff --git a/src/test.lisp b/src/test.lisp index f4e800a..d7318cb 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -1,5 +1,3 @@ ; This is a comment -(print "Hello, World") - -(print (add 1 2)) \ No newline at end of file +(print (add 1333 12423)) \ No newline at end of file diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 10d86b5..1236334 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -92,6 +92,7 @@ impl Tokenizer { tokens.push(Token::Identifier(self.storage.iter().collect())); self.storage.clear(); + continue; } self.storage.push(char); @@ -105,6 +106,9 @@ impl Tokenizer { tokens.push(Token::Integer(self.storage.iter().collect::().parse().unwrap())); self.storage.clear(); + } else { + self.storage.push(char); + continue; } }