We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Syntax.dollar
1 parent 1169af4 commit adff9b8Copy full SHA for adff9b8
1 file changed
std/gdscript/Syntax.hx
@@ -19,4 +19,17 @@ class Syntax {
19
final identifier = "%" + identifier;
20
return macro untyped __gdscript__($v{identifier});
21
}
22
+
23
+ public static macro function dollar(identifier: Expr): Expr {
24
+ final identifier = switch(identifier.expr) {
25
+ case EConst(CString(s, _) | CIdent(s)): s;
26
+ case _: {
27
+ Context.error("Expected String or identifier expression", identifier.pos);
28
+ return macro {};
29
+ }
30
31
32
+ final identifier = "$" + identifier;
33
+ return macro untyped __gdscript__($v{identifier});
34
35
0 commit comments