aboutsummaryrefslogtreecommitdiff
path: root/src/cljcc/schema.clj
diff options
context:
space:
mode:
authorShagun Agrawal <agrawalshagun07@gmail.com>2024-12-16 22:01:02 +0530
committerShagun Agrawal <agrawalshagun07@gmail.com>2024-12-16 22:01:02 +0530
commit77c71f5aedd9598021b14c796e0ea540e8fddf57 (patch)
tree9483094c2ae039f468ae894cd3c5feef78456074 /src/cljcc/schema.clj
parentab47567cde2c0307042118684305c9ad5871f787 (diff)
Add typechecker phase for signed, unsigned
Diffstat (limited to 'src/cljcc/schema.clj')
-rw-r--r--src/cljcc/schema.clj14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cljcc/schema.clj b/src/cljcc/schema.clj
index 936a0ea..6a4fb1f 100644
--- a/src/cljcc/schema.clj
+++ b/src/cljcc/schema.clj
@@ -295,15 +295,25 @@
[:type [:= :int-init]]
[:value int?]])
+(def UIntInit
+ [:map
+ [:type [:= :uint-init]]
+ [:value int?]])
+
(def LongInit
[:map
[:type [:= :long-init]]
[:value int?]])
+(def ULongInit
+ [:map
+ [:type [:= :ulong-init]]
+ [:value int?]])
+
(def Initial
[:map
[:type [:= :initial]]
- [:static-init [:or IntInit LongInit]]])
+ [:static-init [:or IntInit LongInit UIntInit ULongInit]]])
(def InitialValue
[:or
@@ -336,6 +346,8 @@
[:ident->symbol #'SymbolMap]
[:program #'Program]])
+;;;; Tacky Schema
+
(def TackyVar
[:map
[:type [:= :variable]]