Fix integer reading
This commit is contained in:
parent
b51ace40df
commit
c14385a7f8
4 changed files with 4 additions and 4 deletions
|
@ -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) => {
|
||||
|
|
|
@ -17,6 +17,7 @@ fn main() {
|
|||
Vec::new()
|
||||
}
|
||||
};
|
||||
println!("{:?}", tokens);
|
||||
let instructions = parse(tokens);
|
||||
|
||||
let state = LispState::new();
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
; This is a comment
|
||||
|
||||
(print "Hello, World")
|
||||
|
||||
(print (add 1 2))
|
||||
(print (add 1333 12423))
|
|
@ -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 {
|
||||
|
|
Reference in a new issue