allow &prop &mut
This commit is contained in:
@@ -729,10 +729,16 @@ class Macros {
|
|||||||
var b = arg.expBuilder();
|
var b = arg.expBuilder();
|
||||||
switch (arg.def) {
|
switch (arg.def) {
|
||||||
case MetaExp("prop", propExp):
|
case MetaExp("prop", propExp):
|
||||||
|
// TODO allow the reverse order (&mut &prop)
|
||||||
|
var propDeclExp = propExp;
|
||||||
|
switch (propExp.def) {
|
||||||
|
case MetaExp("mut", innerExp):
|
||||||
|
propExp = innerExp;
|
||||||
|
default:
|
||||||
|
}
|
||||||
argList.push(propExp);
|
argList.push(propExp);
|
||||||
propertyDefs.push(
|
propertyDefs.push(
|
||||||
b.call(b.symbol("prop"), [propExp]));
|
b.call(b.symbol("prop"), [propDeclExp]));
|
||||||
// TODO allow &prop &mut or &mut &prop
|
|
||||||
switch (propExp.def) {
|
switch (propExp.def) {
|
||||||
case TypedExp(_, {pos: _, def: Symbol(name)}):
|
case TypedExp(_, {pos: _, def: Symbol(name)}):
|
||||||
propertySetExps.push(
|
propertySetExps.push(
|
||||||
|
Reference in New Issue
Block a user