disable multiple builder args on reader macros
This commit is contained in:
@@ -532,7 +532,11 @@ class Macros {
|
|||||||
case Symbol(s):
|
case Symbol(s):
|
||||||
streamArgName = s;
|
streamArgName = s;
|
||||||
case MetaExp("builder", { pos: _, def: Symbol(b) }):
|
case MetaExp("builder", { pos: _, def: Symbol(b) }):
|
||||||
builderArgName = b;
|
if (builderArgName == null) {
|
||||||
|
builderArgName = b;
|
||||||
|
} else {
|
||||||
|
throw CompileError.fromExp(arg, 'Cannot declare multiple &builder args. Already declared: $builderName');
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
throw messageForBadArgs;
|
throw messageForBadArgs;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user