aboutsummaryrefslogtreecommitdiff
path: root/src/cljcc/schema.clj
diff options
context:
space:
mode:
authorShagun Agrawal <agrawalshagun07@gmail.com>2024-12-16 20:11:01 +0530
committerShagun Agrawal <agrawalshagun07@gmail.com>2024-12-16 20:11:01 +0530
commitab47567cde2c0307042118684305c9ad5871f787 (patch)
treea903307e5bd963a91c143a84da0d0aea6b7198db /src/cljcc/schema.clj
parent90b8a837789eb99c44bcea9abee53012f2df71a4 (diff)
Add parsing for unsigned / signed int, long
Diffstat (limited to 'src/cljcc/schema.clj')
-rw-r--r--src/cljcc/schema.clj16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/cljcc/schema.clj b/src/cljcc/schema.clj
index 0d86453..936a0ea 100644
--- a/src/cljcc/schema.clj
+++ b/src/cljcc/schema.clj
@@ -9,10 +9,18 @@
[:map
[:type [:= :int]]])
+(def UIntType
+ [:map
+ [:type [:= :uint]]])
+
(def LongType
[:map
[:type [:= :long]]])
+(def ULongType
+ [:map
+ [:type [:= :ulong]]])
+
(def FunType
[:map
[:type [:= :function]]
@@ -22,16 +30,20 @@
(def Type
[:schema {:registry {::mtype-int #'IntType
::mtype-long #'LongType
+ ::mtype-uint #'UIntType
+ ::mtype-ulong #'ULongType
::mtype-function #'FunType}}
[:multi {:dispatch :type}
[:int #'IntType]
[:long #'LongType]
+ [:uint #'UIntType]
+ [:ulong #'ULongType]
[:function #'FunType]]])
(def Const
[:map
- [:type [:enum :int :long]]
- [:value int?]])
+ [:type [:enum :int :long :uint :ulong]]
+ [:value number?]])
(def ConstantExp
[:map