short syntax in meta
This commit is contained in:
@@ -19,7 +19,10 @@ class MetaUtils {
|
||||
switch (p.expr) {
|
||||
case EBinop(OpAssign, e1, e2):
|
||||
if (e1.toString() == name) res = { expr:e2.expr, pos:p.pos };
|
||||
case EConst(CIdent(s)):
|
||||
if (s == name) res = { expr:(macro true).expr , pos: p.pos };
|
||||
case _:
|
||||
trace(p.expr);
|
||||
Context.warning('Bindable arguments syntax error. Supported syntax: (flag1=true, flag2=false)', p.pos);
|
||||
}
|
||||
if (res != null) break;
|
||||
|
||||
+1
-1
@@ -301,7 +301,7 @@ class Bindable1 implements bindx.IBindable {
|
||||
@:bindable(lazySignal=false)
|
||||
public var str2:String;
|
||||
|
||||
@:bindable(lazySignal=true)
|
||||
@:bindable(lazySignal)
|
||||
public function bind() {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class ForceTest extends BuddySuite {
|
||||
}
|
||||
}
|
||||
|
||||
@:bindable(force=true)
|
||||
@:bindable(force)
|
||||
class BindableForce implements bindx.IBindable {
|
||||
|
||||
public var str(default, never):String;
|
||||
|
||||
Reference in New Issue
Block a user