language: Change extern type syntax

Use a '$' instead of a '.' to indicate a type provided in application
code.

The reason for the change is to have a consistent "extern" symbol that
isn't widely used elsewhere and isn't ambiguous in expressions.
This commit is contained in:
James Westman 2022-12-25 16:11:17 -06:00
parent be284de879
commit 0b402db4d5
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
11 changed files with 41 additions and 13 deletions

View file

@ -87,7 +87,7 @@ def validate_parent_type(node, ns: str, name: str, err_msg: str):
def decompile_object(ctx, gir, klass, id=None):
gir_class = ctx.type_by_cname(klass)
klass_name = (
decompile.full_name(gir_class) if gir_class is not None else "." + klass
decompile.full_name(gir_class) if gir_class is not None else "$" + klass
)
if id is None:
ctx.print(f"{klass_name} {{")