summaryrefslogtreecommitdiffstats
path: root/src/forth/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/forth/compiler.rs')
-rw-r--r--src/forth/compiler.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/forth/compiler.rs b/src/forth/compiler.rs
index 17f0113..97e94a9 100644
--- a/src/forth/compiler.rs
+++ b/src/forth/compiler.rs
@@ -1,4 +1,4 @@
-use super::vm::{ByteCode, OpCode, WordList};
+use super::vm::{ByteCode, DataStackType, OpCode, WordList};
use std::collections::HashMap;
use std::iter::{Enumerate, Iterator};
@@ -116,7 +116,7 @@ impl<'a> Compiler<'a> {
pub fn compile(&mut self) -> CompileResult<()> {
while let Some((word, start, end)) = self.next_word() {
let anno = Annotation { loc: (start, end) };
- if let Ok(i) = word.parse::<i32>() {
+ if let Ok(i) = word.parse::<DataStackType>() {
self.bc_push(OpCode::Num(i), anno);
} else if let Some(i) = self.wordalog.0.get(word) {
self.bc_push(OpCode::Call(*i), anno);