language: Add closure expressions

This commit is contained in:
James Westman 2022-12-24 21:46:03 -06:00
parent 5cf9b63547
commit 59aa054c4c
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
10 changed files with 96 additions and 7 deletions

View file

@ -189,7 +189,10 @@ class TypeType(BasicType):
_BASIC_TYPES = {
"bool": BoolType,
"gboolean": BoolType,
"string": StringType,
"gchararray": StringType,
"int": IntType,
"gint": IntType,
"gint64": IntType,
@ -730,6 +733,9 @@ class GirContext:
return None
def get_type(self, name: str, ns: str) -> T.Optional[GirNode]:
if ns is None and name in _BASIC_TYPES:
return _BASIC_TYPES[name]()
ns = ns or "Gtk"
if ns not in self.namespaces: