about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-11 19:36:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-11 19:37:18 -0700
commit244fc3d9aca11c8d6651620228c96cf64195b4bb (patch)
tree84d8e7b83be30e5e5b6e8c7678f2764eb44504b7
parent9e5b342d4031065f29f55c976cf6e84ce6979d0f (diff)
downloadmu-244fc3d9aca11c8d6651620228c96cf64195b4bb.tar.gz
1762 - numbers without types = literals
Quick hack for demo at balisp meetup today.
-rw-r--r--010vm.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/010vm.cc b/010vm.cc
index 4edf59a7..27224f03 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -198,6 +198,10 @@ reagent::reagent(string s) :original_string(s), value(0), initialized(false) {
     }
     types.push_back(Type_ordinal[type]);
   }
+  if (is_integer(name) && types.empty()) {
+    types.push_back(0);
+    properties.at(0).second.push_back("literal");
+  }
   if (name == "_" && types.empty()) {
     types.push_back(0);
     properties.at(0).second.push_back("dummy");