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