From c5e10679c7e10345e9bf6db4efeda4f5ee7d573c Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 9 Mar 2023 19:27:47 -0500 Subject: packed literals again --- libalee/parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libalee/parser.cpp') diff --git a/libalee/parser.cpp b/libalee/parser.cpp index d709d45..a9c9aaa 100644 --- a/libalee/parser.cpp +++ b/libalee/parser.cpp @@ -111,12 +111,12 @@ int Parser::parseNumber(State& state, Word word) if (state.compiling()) { auto ins = CoreWords::findi("_lit"); - //if (l >= 0 && l < 0xFF) { - // state.dict.add(ins | ((l + 1) << 8)); - //} else { + if (value >= 0 && value < static_cast(Dictionary::Begin - CoreWords::WordCount)) { + state.dict.add(value + CoreWords::WordCount); + } else { state.dict.add(ins); state.dict.add(value); - //} + } } else { state.push(value); } -- cgit v1.2.3