Small bug-fixes and improvements
This commit is contained in:
@ -6,7 +6,7 @@ const builtin = ["number", "string", "boolean"];
|
||||
|
||||
export class IRError extends Error {
|
||||
constructor(public statement: StatementNode, message: string) {
|
||||
super("Error Compiling: " + message);
|
||||
super("Error building IR: " + message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ export default function get_ir(parsed: Parsed): IR {
|
||||
if (fnc.return_type.type !== "void" && builtin.indexOf(fnc.return_type.type) < 0) {
|
||||
throw new IRError(
|
||||
fnc,
|
||||
`Type ${fnc.return_type} is not defined`
|
||||
`Type ${fnc.return_type.type} is not defined`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user