Searched refs:TokInt (Results 1 – 13 of 13) sorted by relevance
19 , TokInt681 data TokInt = TokInt Bool UInt function684 instance Token TokInt where685 type Imp TokInt = Int690 | n >= 0 = TokInt True ((Ref.toUInt . fromIntegral) n)696 encodeRef (TokInt True n) = Ref.encodeToken (Ref.MT0_UnsignedInt n)697 encodeRef (TokInt False n) = Ref.encodeToken (Ref.MT1_NegativeInt n)702 Ref.MT0_UnsignedInt n -> return (TokInt True n)703 Ref.MT1_NegativeInt n -> return (TokInt False n)706 instance Arbitrary TokInt where[all …]
95 prop_decodeCanonical_Int :: TokInt -> Property160 , testProperty "Int" (prop_decode_nonCanonical :: TokInt -> Property)
19 , TokInt681 data TokInt = TokInt Bool UInt constructor684 instance Token TokInt where685 type Imp TokInt = Int690 | n >= 0 = TokInt True ((Ref.toUInt . fromIntegral) n)696 encodeRef (TokInt True n) = Ref.encodeToken (Ref.MT0_UnsignedInt n)697 encodeRef (TokInt False n) = Ref.encodeToken (Ref.MT1_NegativeInt n)702 Ref.MT0_UnsignedInt n -> return (TokInt True n)703 Ref.MT1_NegativeInt n -> return (TokInt False n)706 instance Arbitrary TokInt where[all …]
47 checkTok checkReadNum (\case TokInt _ a -> Just a; _ -> Nothing) . unInt49 checkTok checkReadNum (\case TokInt _ a -> Just a; _ -> Nothing) . unHex
61 TokInt raw _ -> raw
174 TokInt _ a -> (tok, Left a)180 TokInt _ a -> (tok, a)
540 pure $ TokInt raw int'650 else pure $ TokInt ("0x" <> chs) $ digitsToIntegerBase 16 $ Text.unpack chs
76 | TokInt !Text !Integer constructor
141 LIT_INT { SourceToken _ (TokInt _ _) }
59 TokInt raw _ -> (0, Text.length raw)
53 #define TokInt 2 /* Integer scanned */ macro
434 return TokInt;438 return TokInt;3682 case TokInt: