Verbose and error if main is not defined

This commit is contained in:
Jordi Baylina
2018-10-24 20:27:34 +02:00
parent cb9a5b536e
commit 5e58584a01
2 changed files with 23 additions and 7 deletions

View File

@@ -62,8 +62,13 @@ async function compile(srcFile) {
fileName: fullFileName
};
exec(ctx, ast);
if (!ctx.components["main"]) {
throw new Error("A main component must be defined");
}
classifySignals(ctx);
reduceConstants(ctx);