Skip to content

Commit 1fce6d5

Browse files
committed
remove unnecessary space
1 parent 430d812 commit 1fce6d5

File tree

6 files changed

+0
-17
lines changed

6 files changed

+0
-17
lines changed

build/build.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const BUILD_OPTIONS: ESBuild.BuildOptions = {
99
minify: true,
1010
define: { LIVE_RELOAD: "false" },
1111
};
12-
1312
if (import.meta.main) {
1413
const start = performance.now();
1514
await Dictionary.build();

src/examples.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ export const EXAMPLE_SENTENCES = [
189189
"mi alasa sitelen e lipu pona",
190190
"jan sona li alasa sona e ijo mute",
191191
];
192-
193192
// Examples taken from https://telo-misikeke.gitlab.io/
194193
export const MALFORMED_SENTENCES = [
195194
"mi jan Nikola, li kama pana e lukin pi ilo ni tawa sini.",

src/main.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ if (LIVE_RELOAD) {
88
new EventSource("/esbuild")
99
.addEventListener("change", () => location.reload());
1010
}
11-
1211
import { dictionary } from "../dictionary/dictionary.ts";
1312
import { flattenError } from "../misc/misc.ts";
1413
import PROJECT_DATA from "../project_data.json" with { type: "json" };
@@ -289,13 +288,11 @@ function main(): void {
289288
}
290289
});
291290
}
292-
293291
if (document.readyState === "loading") {
294292
document.addEventListener("DOMContentLoaded", main);
295293
} else {
296294
main();
297295
}
298-
299296
// remove unused local storage data
300297
const used = [DICTIONARY_KEY, ...Object.keys(settings)];
301298
const unused = [...new Array(localStorage.length).keys()]
@@ -304,7 +301,6 @@ const unused = [...new Array(localStorage.length).keys()]
304301
for (const key of unused) {
305302
localStorage.removeItem(key);
306303
}
307-
308304
function extractErrorMessage(error: unknown): string {
309305
if (error instanceof Error) {
310306
return error.message;

src/parser/punctuation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const SENTENCE_TERMINATOR_TO_ASCII = new Map([
2222
[ELLIPSIS, "..."] as const,
2323
[MIDDLE_DOT, "."] as const,
2424
]);
25-
2625
export const SENTENCE_TERMINATOR = characterClass(
2726
SENTENCE_TERMINATOR_TO_ASCII.keys(),
2827
);

src/parser/test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@ Deno.test("AST all distinct", () => {
1717
}
1818
}
1919
});
20-
2120
Deno.test("parser all error", () => {
2221
for (const sentence of MALFORMED_SENTENCES) {
2322
assertThrows(() => parser.parse(sentence).unwrap());
2423
}
2524
});
26-
2725
Deno.test("ucsur have proper length", () => {
2826
assertEquals(PU.length, 120);
2927
assertEquals(KU_SULI.length, 17);
3028
assertEquals(KU_LILI.length, 4);
3129
});
32-
3330
Deno.test("ucsur ordered", () => {
3431
for (const [i, word] of PU.entries()) {
3532
if (i < PU.length - 1) {
@@ -38,19 +35,16 @@ Deno.test("ucsur ordered", () => {
3835
}
3936
}
4037
});
41-
4238
Deno.test("no ali", () => {
4339
for (const word of PU) {
4440
assertNotEquals(word, "ali");
4541
}
4642
});
47-
4843
function uniquePairs<T>(
4944
array: ReadonlyArray<T>,
5045
): ReadonlyArray<readonly [T, T]> {
5146
return array.flatMap((a, i) => array.slice(i + 1).map((b) => [a, b]));
5247
}
53-
5448
Deno.test("small parser", () => {
5549
const space = match(/\s*/, "space");
5650
const parser = sequence(
@@ -60,13 +54,11 @@ Deno.test("small parser", () => {
6054
);
6155
assertEquals(parser.parse("toki pona a").unwrap(), [["toki", "pona", "a"]]);
6256
});
63-
6457
Deno.test("many", () => {
6558
const space = match(/\s*/, "space");
6659
const parser = many(matchString("a").skip(space)).skip(end);
6760
assertEquals(parser.parse("a a a").unwrap(), [["a", "a", "a"]]);
6861
});
69-
7062
Deno.test("all", () => {
7163
const space = match(/\s*/, "space");
7264
const parser = all(matchString("a").skip(space)).skip(end);

src/translator/test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ Deno.test("verb with adverb", () => {
88
const translations = translate("mi toki pona").unwrap();
99
assertArrayIncludes(translations, ["I nicely communicate"]);
1010
});
11-
1211
Deno.test("adjective with adverb", () => {
1312
const translations = translate("pona ike").unwrap();
1413
assertArrayIncludes(translations, ["Badly good"]);
1514
});
16-
1715
const NUMBER_TESTS = new Map(Object.entries({
1816
"tu tu tu wan": 7,
1917
"luka tu": 7,

0 commit comments

Comments
 (0)