Skip to content

Commit eac0b00

Browse files
committed
add content clause node to verb phrase
1 parent 568017f commit eac0b00

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/translator/ast.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export type VerbPhrase =
5757
adverb: ReadonlyArray<Word>;
5858
verb: Verb;
5959
subjectComplement: null | Complement;
60+
contentClause: null | Clause;
6061
object: null | NounPhrase;
6162
objectComplement: null | Complement;
6263
preposition: ReadonlyArray<Preposition>;

src/translator/composer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { nullableAsArray } from "../misc.ts";
22
import * as English from "./ast.ts";
3+
import { phraseAsVerb } from "./phrase.ts";
34

45
const EMPHASIS_STARTING_TAG = "<strong>";
56
const EMPHASIS_ENDING_TAG = "</strong>";
@@ -97,6 +98,7 @@ export function verb(phrase: English.VerbPhrase, depth: number): string {
9798
...phrase.adverb.map(word),
9899
...verbText,
99100
...nullableAsArray(phrase.subjectComplement).map(complement),
101+
...nullableAsArray(phrase.contentClause).map(clause),
100102
]
101103
.join(" ");
102104
break;

0 commit comments

Comments
 (0)