make null-extern no-extern, which throws an error
This commit is contained in:
@@ -794,12 +794,11 @@ class Macros {
|
||||
wholeExp.checkNumArgs(4, null, "(#extern <BodyType> <lang> <?compileArgs object> [<typed bindings...>] <body...>)");
|
||||
var b = wholeExp.expBuilder();
|
||||
|
||||
// Skip all extern code generation if -D null-extern is provided to the compiler
|
||||
if (Context.defined("null-extern")) {
|
||||
return b.symbol("null");
|
||||
// Skip all extern code generation if -D no-extern is provided to the compiler
|
||||
if (Context.defined("no-extern")) {
|
||||
return b.callSymbol("throw", [b.str("tried to call #extern code when -D no-extern was provided during compilation")]);
|
||||
}
|
||||
|
||||
|
||||
var bodyType = exps.shift();
|
||||
var langExp = exps.shift();
|
||||
var originalLang = langExp.symbolNameValue();
|
||||
|
@@ -37,7 +37,7 @@ class Main {
|
||||
// kiss implement [type] [fromLib]
|
||||
var _pwd = args.pop();
|
||||
var theInterface = args.shift();
|
||||
var pArgs = ["-D", "null-extern", "build-scripts/common-args.hxml", "-lib", "kiss"];
|
||||
var pArgs = ["-D", "no-extern", "build-scripts/common-args.hxml", "-lib", "kiss"];
|
||||
// pass --lib and the lib containing the interface as specified
|
||||
if (args.length > 0) {
|
||||
pArgs = pArgs.concat(["-lib", args.shift()]);
|
||||
|
Reference in New Issue
Block a user