generate typedefs in CodegenRust

This commit is contained in:
Prabhjyot Singh Sodhi 2016-01-26 21:53:28 +05:30
parent 525e77f64f
commit d6df844ae5
2 changed files with 16 additions and 0 deletions

View file

@ -60,6 +60,7 @@ class Configuration:
descriptor.uniqueImplementation = len(otherDescriptors) == 1
self.enums = [e for e in parseData if e.isEnum()]
self.typedefs = [e for e in parseData if e.isTypedef()]
self.dictionaries = [d for d in parseData if d.isDictionary()]
self.callbacks = [c for c in parseData if
c.isCallback() and not c.isInterface()]
@ -90,6 +91,9 @@ class Configuration:
def getEnums(self, webIDLFile):
return filter(lambda e: e.filename() == webIDLFile, self.enums)
def getTypedefs(self, webIDLFile):
return filter(lambda e: e.filename() == webIDLFile, self.typedefs)
@staticmethod
def _filterForFile(items, webIDLFile=""):
"""Gets the items that match the given filters."""