Decode a Lua string to an dictionary
        :type text: str
        :rtype: dict
        :param text: string to decode
        :return: dictionary

def decode(self, text):
        """Decode a Lua string to an dictionary
        :type text: str
        :rtype: dict
        :param text: string to decode
        :return: dictionary
        """
        LOGGER.debug('decoding text to dictionary')

        if not text or type(text) is not str:
            raise SLTPParsingError(ERRORS['unexp_type_str'])

        LOGGER.debug('extracting qualifier')
        qual = re.compile(r'^(?P<value>(dictionary|mission|mapResource|warehouses) = ?)\n')
        match = qual.match(text)

        if match is None:
            raise ValueError('qualifier not found; first line: {}'.format(text.split('\n')[0]))

        self.qual = match.group('value')
        text = qual.sub('', text)

        reg = re.compile(r' -- .*[^(\\|",)]$', re.M)
        text = reg.sub('', text)

        self.text = text
        self.at, self.ch, self.depth = 0, '', 0
        self.len = len(text)
        self.next_chr()
        result = self.value()
        return result, self.qual