Skip to content

Commit

Permalink
Fix location directory annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-y committed Sep 3, 2024
1 parent 1cec980 commit 06f8550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/cli/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { processSemantics } from "../semantics/index.js";
import binaryen from "binaryen";
import { testGc } from "../lib/binaryen-gc/test.js";
import { parseFile, parseModuleFromSrc } from "../parser/index.js";
import { compileSrc } from "../compiler.js";

export const exec = () => main().catch(errorHandler);

Expand Down Expand Up @@ -70,9 +71,7 @@ async function getMacroAst(index: string) {
}

async function getWasmMod(index: string, optimize = false) {
const module = await parseModuleFromSrc(index);
const checkedAst = processSemantics(module);
const mod = assemble(checkedAst);
const mod = await compileSrc(index);

if (optimize) {
binaryen.setShrinkLevel(3);
Expand Down
2 changes: 1 addition & 1 deletion src/parser/utils/parse-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { List } from "../../syntax-objects/list.js";

export const parseFile = async (path: string): Promise<List> => {
const file = fs.readFileSync(path, { encoding: "utf8" });
return parse(file);
return parse(file, path);
};

0 comments on commit 06f8550

Please sign in to comment.