From ab47567cde2c0307042118684305c9ad5871f787 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Mon, 16 Dec 2024 20:11:01 +0530 Subject: Add parsing for unsigned / signed int, long --- src/cljcc/schema.clj | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/cljcc/schema.clj') 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 -- cgit v1.2.3