diff --git a/src/ast.ts b/src/ast.ts index 6253dda..5407a9d 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -58,7 +58,7 @@ export type ExprLet = { type?: Type; rhs: Expr; // IMPORTANT: This is (sadly) shared with ExprBlock. - local?: LocalInfo, + local?: LocalInfo; }; export type ExprBlock = { diff --git a/src/index.ts b/src/index.ts index 0fe2480..8d6800f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,8 +42,7 @@ function main() { console.log("-----AST typecked------"); const typecked = typeck(resolved); - console.dir(typecked, {depth: 8}); - + console.dir(typecked, { depth: 8 }); console.log("-----wasm--------------"); const wasmModule = lowerToWasm(typecked); diff --git a/src/lower.ts b/src/lower.ts index df2329e..6290670 100644 --- a/src/lower.ts +++ b/src/lower.ts @@ -629,7 +629,7 @@ function addRt(cx: Context, ast: Ast) { { kind: "local.get", imm: 0 }, { kind: "i32.store", imm: { offset: 0, align: 4 } }, // get the length and store it in the iovec - { kind: "i32.const", imm: iovecArray + 4 }, + { kind: "i32.const", imm: iovecArray + 4 }, { kind: "local.get", imm: 1 }, { kind: "i32.store", imm: { offset: 0, align: 4 } }, // now call stuff diff --git a/src/typeck.ts b/src/typeck.ts index c947f4e..323159a 100644 --- a/src/typeck.ts +++ b/src/typeck.ts @@ -316,7 +316,7 @@ export class InferContext { public resolveIfPossible(ty: Ty): Ty { // TODO: dont be shallow resolve - // note that fixing this will cause cycles. fix those cycles instead using + // note that fixing this will cause cycles. fix those cycles instead using // he fancy occurs check as errs called it. if (ty.kind === "var") { return this.tryResolveVar(ty.index) ?? ty; diff --git a/src/utils.ts b/src/utils.ts index 2dd0261..644bf11 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,3 +1,3 @@ export function encodeUtf8(s: string): Uint8Array { - return new TextEncoder().encode(s); -} \ No newline at end of file + return new TextEncoder().encode(s); +}