# Path: cmd_ir/core_types.py
# class InsnArg:
# 
#     @classmethod
#     def _init_from_parser(cls, value):
#         return value
# 
# class NativeType(InsnArg):
# 
#     @classmethod
#     def typename(cls):
#         return cls.__name__
# 
#     def clone(self):
#         raise TypeError(self.typename() + ' does not support cloning')
# 
#     def inline_copy(self):
#         import copy
#         return copy.copy(self)
# 
#     def write_out(self, out):
#         pass
# 
# Path: cmd_ir/nbt.py
# class NBTType(NativeType):
# 
#     __LOOKUP = {}
# 
#     def __init__(self, typename, compound=False):
#         self.name = typename
#         self._compound = compound
#         self.__LOOKUP[typename] = self
# 
#     @property
#     def exec_store_name(self):
#         assert self.isnumeric
#         # Currently we have the same names
#         return self.name
# 
#     @property
#     def isnumeric(self):
#         return not self._compound and self.name != 'string'
# 
#     def __str__(self):
#         return 'NBTType(%s)' % self.name
# 
#     def serialize(self):
#         return self.name
# 
#     @classmethod
#     def _init_from_parser(cls, value):
#         return cls.__LOOKUP[value]
# 
#     def new(self, *args):
#         # There are better ways of doing this
#         if self is self.byte:
#             impl = NBTByte
#         elif self is self.short:
#             impl = NBTShort
#         elif self is self.int:
#             impl = NBTInt
#         elif self is self.long:
#             impl = NBTLong
#         elif self is self.float:
#             impl = NBTFloat
#         elif self is self.double:
#             impl = NBTDouble
#         elif self is self.string:
#             impl = NBTString
#         elif self is self.list:
#             impl = NBTList
#         elif self is self.compound:
#             impl = NBTCompound
#         else:
#             assert False, str(self)
#         return impl(*args)
# 
#     byte = None
#     short = None
#     int = None
#     long = None
#     float = None
#     double = None
#     string = None
#     list = None
#     compound = None


import abc
import commands as c
        import copy
from .core_types import InsnArg, NativeType
from .nbt import NBTType
        self.nbt_path_key = nbt_key
        self.nbt_type = nbt_type
        self.isnumeric = numeric
        self.default_val = default
        self.conversions = conversions
        self.__LOOKUP[name] = self

    def __str__(self):
        return 'VarType(%s)' % (self.name)

    def to_int(self, val):
        return self.conversions.to_int(val)

    @property
    def scale(self):
        return self.conversions.scale

    @classmethod
    def _init_from_parser(cls, value):
        return cls.__LOOKUP[value]

    # pickle the singleton
    def __reduce__(self):
        return 'VarType.%s' % self.name

    i32 = None
    nbt = None
    # https://en.wikipedia.org/wiki/Q_%28number_format%29
    q10 = None


# Path: cmd_ir/core_types.py
# class InsnArg:
# 
#     @classmethod
#     def _init_from_parser(cls, value):
#         return value
# 
# class NativeType(InsnArg):
# 
#     @classmethod
#     def typename(cls):
#         return cls.__name__
# 
#     def clone(self):
#         raise TypeError(self.typename() + ' does not support cloning')
# 
#     def inline_copy(self):
#         import copy
#         return copy.copy(self)
# 
#     def write_out(self, out):
#         pass
# 
# Path: cmd_ir/nbt.py
# class NBTType(NativeType):
# 
#     __LOOKUP = {}
# 
#     def __init__(self, typename, compound=False):
#         self.name = typename
#         self._compound = compound
#         self.__LOOKUP[typename] = self
# 
#     @property
#     def exec_store_name(self):
#         assert self.isnumeric
#         # Currently we have the same names
#         return self.name
# 
#     @property
#     def isnumeric(self):
#         return not self._compound and self.name != 'string'
# 
#     def __str__(self):
#         return 'NBTType(%s)' % self.name
# 
#     def serialize(self):
#         return self.name
# 
#     @classmethod
#     def _init_from_parser(cls, value):
#         return cls.__LOOKUP[value]
# 
#     def new(self, *args):
#         # There are better ways of doing this
#         if self is self.byte:
#             impl = NBTByte
#         elif self is self.short:
#             impl = NBTShort
#         elif self is self.int:
#             impl = NBTInt
#         elif self is self.long:
#             impl = NBTLong
#         elif self is self.float:
#             impl = NBTFloat
#         elif self is self.double:
#             impl = NBTDouble
#         elif self is self.string:
#             impl = NBTString
#         elif self is self.list:
#             impl = NBTList
#         elif self is self.compound:
#             impl = NBTCompound
#         else:
#             assert False, str(self)
#         return impl(*args)
# 
#     byte = None
#     short = None
#     int = None
#     long = None
#     float = None
#     double = None
#     string = None
#     list = None
#     compound = None


# Path: cmd_ir/variables.py
import abc
import commands as c
        import copy
from .core_types import InsnArg, NativeType
from .nbt import NBTType

        self.nbt_path_key = nbt_key
        self.nbt_type = nbt_type
        self.isnumeric = numeric
        self.default_val = default
        self.conversions = conversions
        self.__LOOKUP[name] = self

    def __str__(self):
        return 'VarType(%s)' % (self.name)

    def to_int(self, val):
        return self.conversions.to_int(val)

    @property
    def scale(self):
        return self.conversions.scale

    @classmethod
    def _init_from_parser(cls, value):
        return cls.__LOOKUP[value]

    # pickle the singleton
    def __reduce__(self):
        return 'VarType.%s' % self.name

    i32 = None
    nbt = None
    # https://en.wikipedia.org/wiki/Q_%28number_format%29
    q10 = None


VarType.i32 = VarType('i32', 'int', True, NBTType.int, 0, IConversions())