Skip to content

Commit b052c7b

Browse files
committed
rename
1 parent 4a9f5fb commit b052c7b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/translator/clause.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export function contextClause(
234234
);
235235
default:
236236
return ArrayResult.concat<ReadonlyArray<English.Clause>>(
237-
new ArrayResult(nullableAsArray(unwrap(contextClause)))
237+
new ArrayResult(nullableAsArray(unwrapSingleWord(contextClause)))
238238
.flatMap((wordUnit) =>
239239
fromSimpleDefinition(
240240
wordUnit,
@@ -251,7 +251,7 @@ export function contextClause(
251251
);
252252
}
253253
}
254-
export function unwrap(
254+
export function unwrapSingleWord(
255255
clause: TokiPona.Clause,
256256
): null | TokiPona.WordUnit {
257257
if (clause.type === "phrases" && clause.phrases.type === "single") {

src/translator/sentence.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { dictionary } from "../dictionary.ts";
44
import * as TokiPona from "../parser/ast.ts";
55
import { definitionAsPlainString } from "./as_string.ts";
66
import * as English from "./ast.ts";
7-
import { clause, contextClause, unwrap } from "./clause.ts";
7+
import { clause, contextClause, unwrapSingleWord } from "./clause.ts";
88
import { FilteredError, TranslationTodoError } from "./error.ts";
99
import { noEmphasis } from "./word.ts";
1010
import { fromSimpleDefinition } from "./word_unit.ts";
@@ -107,7 +107,9 @@ function sentence(
107107
const interjectionClause: ArrayResult<English.Clause> =
108108
sentence.contextClauses.length === 0 &&
109109
sentence.startingParticle == null
110-
? new ArrayResult(nullableAsArray(unwrap(sentence.finalClause)))
110+
? new ArrayResult(
111+
nullableAsArray(unwrapSingleWord(sentence.finalClause)),
112+
)
111113
.flatMap((wordUnit) =>
112114
fromSimpleDefinition(
113115
wordUnit,

0 commit comments

Comments
 (0)