Detect unused variables

This commit is contained in:
nora 2024-05-13 20:02:08 +02:00
parent f164aad631
commit 9270f52e6b
33 changed files with 340 additions and 63 deletions

View file

@ -104,7 +104,7 @@ export const loadPkg: PkgLoader = (
return dummyErrorPkg(
pkgId,
name,
gcx.error.emit(
gcx.error.emitError(
new CompilerError(`cycle detected loading extern module ${name}`, span),
),
);
@ -118,7 +118,7 @@ export const loadPkg: PkgLoader = (
const file = loadModuleFile(".", name, span);
if (!file.ok) {
return dummyErrorPkg(pkgId, name, gcx.error.emit(file.err));
return dummyErrorPkg(pkgId, name, gcx.error.emitError(file.err));
}
const tokens = tokenize(gcx.error, file.value);