Skip to content

Commit

Permalink
Fix imports etc
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-y committed Sep 21, 2024
1 parent 8b7edc8 commit 52d2fa9
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/fast-shift-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class FastShiftArray<T> {
this.headIndex = 0;
}

forEach(callbackfn: (value: T, index: number, array: T[]) => voyd): void {
forEach(callbackfn: (value: T, index: number, array: T[]) => void): void {
this.items.slice(this.headIndex).forEach(callbackfn);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CharStream } from "../../char-stream.js";

export const parseFileVoidText = `
export const parseFileVoydText = `
fn fib(n: i32) -> i32
if n <= 1 then:
n
Expand Down Expand Up @@ -35,4 +35,4 @@ fn main()
let result = fib(n)
`;

export const voydFile = new CharStream(parseFileVoidText, "beep/boop");
export const voydFile = new CharStream(parseFileVoydText, "beep/boop");
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const regularMacrosVoidFile = `
export const regularMacrosVoydFile = `
macro \`()
quote quote $@body
Expand Down
4 changes: 2 additions & 2 deletions src/semantics/__tests__/regular-macros.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { parse } from "../../parser/parser.js";
import path from "node:path";
import { registerModules } from "../modules.js";
import { expandRegularMacros } from "../regular-macros.js";
import { regularMacrosVoidFile } from "./fixtures/regular-macros-voyd-file.js";
import { regularMacrosVoydFile } from "./fixtures/regular-macros-voyd-file.js";
import { test } from "vitest";
import { List } from "../../syntax-objects/list.js";

test("regular macro expansion", async (t) => {
const parserOutput = parse(regularMacrosVoidFile);
const parserOutput = parse(regularMacrosVoydFile);
const files = {
std: new List([]),
test: parserOutput,
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-objects/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Call extends Syntax {
return this.#type;
}

eachArg(fn: (expr: Expr) => voyd) {
eachArg(fn: (expr: Expr) => void) {
this.args.each(fn);
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-objects/lib/child-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ChildList<T extends Expr = Expr> {
return this;
}

each(fn: (expr: T, index: number, array: T[]) => voyd): ChildList<T> {
each(fn: (expr: T, index: number, array: T[]) => void): ChildList<T> {
this.toArray().forEach(fn);
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-objects/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class List extends Syntax {
return this;
}

each(fn: (expr: Expr, index: number, array: Expr[]) => voyd): List {
each(fn: (expr: Expr, index: number, array: Expr[]) => void): List {
this.toArray().forEach(fn);
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-objects/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class VoidModule extends ScopedNamedEntity {
return [...path, this.name.toString()];
}

each(fn: (expr: Expr, index: number, array: Expr[]) => voyd): VoidModule {
each(fn: (expr: Expr, index: number, array: Expr[]) => void): VoidModule {
this.value.forEach(fn);
return this;
}
Expand Down

0 comments on commit 52d2fa9

Please sign in to comment.