mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Support C class names that ignore GIR
By writing `.MyAppComponent` instead of `MyApp.Component`, the compiler will ignore GIR validation for that class and assume it's application-defined.
This commit is contained in:
parent
8ef65196f3
commit
b387d4114f
3 changed files with 20 additions and 16 deletions
|
@ -190,7 +190,6 @@ class Repository(GirNode):
|
|||
class GirContext:
|
||||
def __init__(self):
|
||||
self.namespaces = {}
|
||||
self.incomplete = set([])
|
||||
|
||||
|
||||
def add_namespace(self, namespace: Namespace):
|
||||
|
@ -201,12 +200,6 @@ class GirContext:
|
|||
self.namespaces[namespace.name] = namespace
|
||||
|
||||
|
||||
def add_incomplete(self, namespace: str):
|
||||
""" Adds an "incomplete" namespace for which missing items won't cause
|
||||
errors. """
|
||||
self.incomplete.add(namespace)
|
||||
|
||||
|
||||
def get_class(self, name: str, ns:str=None) -> Class:
|
||||
if ns is None:
|
||||
options = [namespace.classes[name]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue