Beispiel #1
0
 def typer(hint):
     """
     :param lal.AdaNode hint: the lal type.
     :return: The corresponding lalcheck type.
     :rtype: types.Boolean | types.IntRange
     """
     if hint == bool_type:
         return types.Boolean()
     elif hint == int_type:
         return types.IntRange(-2 ** 31, 2 ** 31 - 1)
     elif hint == char_type:
         return types.ASCIICharacter()
Beispiel #2
0
 def to_int_range(xs):
     return types.IntRange(*xs)
Beispiel #3
0
 def to_int_range(modulus):
     return types.IntRange(0, modulus - 1)