[macro] signal macro expression wrap with function
This commit is contained in:
@@ -154,7 +154,12 @@ class TemplateMacro {
|
||||
var value = createValue(name, key, Reflect.field(data, key), position, exprs);
|
||||
if (value != null) {
|
||||
if (key.charAt(0) == "+") {
|
||||
exprs.push(Context.parse('${name}.${key.substr(1)}.connect(${value})', getPosition(position)));
|
||||
var e:Expr = Context.parse(value, getPosition(position));
|
||||
e = switch (e.expr) {
|
||||
case ECall(_, _): macro function(_) ${e};
|
||||
case _: e;
|
||||
}
|
||||
exprs.push(macro $p{[name, key.substr(1)]}.connect(${e}));
|
||||
} else {
|
||||
exprs.push(Context.parse('${name}.${key} = ${value}', getPosition(position)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user