Пример #1
0
	def __init__(self, filename, line, name, datafields, functions):
		AbstractSyntaxItem.__init__(self, filename, line)

		self.name = name

		self.datafields = datafields
		self.functions = functions
Пример #2
0
	def __init__(self, filename, line, datatype, name):
		AbstractSyntaxItem.__init__(self, filename, line)

		if datatype == 'void':
			self.error("Illegal data type: 'void' is not a valid data type for fields")

		self.name = name
		self.datatype = datatype
Пример #3
0
    def __init__(self, filename, line, *args):
        AbstractSyntaxItem.__init__(self, filename, line)

        if len(args) != len(self.argumentNames):
            self.error(
                "Internal error: incorrect number of arguments for code item '%s'. Expected %d, got %d"
                % (type(self).__name__, len(self.argumentNames), len(args))
            )

        for index in xrange(len(self.argumentNames)):
            setattr(self, self.argumentNames[index], args[index])