aboutsummaryrefslogtreecommitdiffstats
path: root/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/parser.cpp b/parser.cpp
index 8a77df5..0883230 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -54,19 +54,20 @@ ParseStatus Parser::parseWord(State& state, Word word)
{
int ins, imm;
- ins = CoreWords::findi(state, word);
- if (ins < 0) {
- ins = state.dict.find(word);
+ ins = state.dict.find(word);
- if (ins <= 0) {
+ if (ins <= 0) {
+ ins = CoreWords::findi(state, word);
+
+ if (ins < 0) {
return parseNumber(state, word);
} else {
- imm = state.dict.read(ins) & CoreWords::Immediate;
- ins = state.dict.getexec(ins);
+ imm = ins & CoreWords::Compiletime;
+ ins &= ~CoreWords::Compiletime;
}
} else {
- imm = ins & CoreWords::Compiletime;
- ins &= ~CoreWords::Compiletime;
+ imm = state.dict.read(ins) & CoreWords::Immediate;
+ ins = state.dict.getexec(ins);
}
if (state.dict.read(Dictionary::Postpone)) {