Skip to content

Commit

Permalink
english &P
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Aug 26, 2023
1 parent 5dbc3cf commit 538b25f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/english.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,16 @@ function branchToEnglish(tree: Branch<Tree>): string {
return 'if ' + translator.emit().replace(/^that /, '') + ', then ' + eng;
}
}
if (tree.label === '&P') {
assertBranch(tree.right);
return (
treeToEnglish(tree.left) +
' ' +
leafToEnglish(tree.right.left) +
' ' +
treeToEnglish(tree.right.right)
);
}
throw new Error('unimplemented in branchToEnglish: ' + tree.label);
}

Expand Down

0 comments on commit 538b25f

Please sign in to comment.