@@ -5,11 +5,8 @@ import * as Composer from "../parser/composer.ts";
5
5
import { adjective , compoundAdjective } from "./adjective.ts" ;
6
6
import * as English from "./ast.ts" ;
7
7
import { determiner } from "./determiner.ts" ;
8
- import {
9
- ExhaustedError ,
10
- FilteredError ,
11
- TranslationTodoError ,
12
- } from "./error.ts" ;
8
+ import { ExhaustedError , TranslationTodoError } from "./error.ts" ;
9
+ import { nanpa } from "./nanpa.ts" ;
13
10
import { noun } from "./noun.ts" ;
14
11
import { number } from "./number.ts" ;
15
12
import { phrase } from "./phrase.ts" ;
@@ -163,44 +160,6 @@ export function pi(
163
160
modifier . type !== "adjective" || modifier . inWayPhrase == null
164
161
) as ArrayResult < ModifierTranslation > ;
165
162
}
166
- export function nanpa (
167
- nanpa : TokiPona . Modifier & { type : "nanpa" } ,
168
- ) : ArrayResult < English . NounPhrase > {
169
- return phrase ( {
170
- phrase : nanpa . phrase ,
171
- place : "object" ,
172
- includeGerund : true ,
173
- includeVerb : false ,
174
- } )
175
- . map ( ( phrase ) => {
176
- if ( phrase . type !== "noun" ) {
177
- throw new FilteredError (
178
- `${ phrase . type } within "in position" phrase` ,
179
- ) ;
180
- } else if (
181
- ( phrase . noun as English . NounPhrase & { type : "simple" } )
182
- . preposition . length > 0
183
- ) {
184
- throw new FilteredError ( 'preposition within "in position" phrase' ) ;
185
- } else {
186
- return {
187
- type : "simple" ,
188
- determiner : [ ] ,
189
- adjective : [ ] ,
190
- noun : {
191
- word : "position" ,
192
- emphasis : nanpa . nanpa . emphasis != null ,
193
- } ,
194
- quantity : "singular" ,
195
- perspective : "third" ,
196
- postCompound : phrase . noun ,
197
- postAdjective : null ,
198
- preposition : [ ] ,
199
- emphasis : false ,
200
- } ;
201
- }
202
- } ) ;
203
- }
204
163
function modifier (
205
164
modifier : TokiPona . Modifier ,
206
165
) : ArrayResult < ModifierTranslation > {
0 commit comments