@@ -67,30 +67,32 @@ function interjection(clause: TokiPona.Clause): ArrayResult<English.Clause> {
67
67
const { phrase } = clause . phrases ;
68
68
if ( phrase . type === "default" && phrase . modifiers . length === 0 ) {
69
69
const { headWord } = phrase ;
70
- if ( headWord . type === "default" || headWord . type === "reduplication" ) {
71
- return new ArrayResult ( dictionary . get ( headWord . word ) ! . definitions )
72
- . filterMap ( ( definition ) => {
73
- if ( definition . type === "interjection" ) {
74
- switch ( headWord . type ) {
75
- case "default" :
76
- return definition . interjection ;
77
- case "reduplication" :
78
- return repeatWithSpace (
79
- definition . interjection ,
80
- headWord . count ,
81
- ) ;
70
+ switch ( headWord . type ) {
71
+ case "default" :
72
+ case "reduplication" :
73
+ return new ArrayResult ( dictionary . get ( headWord . word ) ! . definitions )
74
+ . filterMap ( ( definition ) => {
75
+ if ( definition . type === "interjection" ) {
76
+ switch ( headWord . type ) {
77
+ case "default" :
78
+ return definition . interjection ;
79
+ case "reduplication" :
80
+ return repeatWithSpace (
81
+ definition . interjection ,
82
+ headWord . count ,
83
+ ) ;
84
+ }
85
+ } else {
86
+ return null ;
82
87
}
83
- } else {
84
- return null ;
85
- }
86
- } )
87
- . map < English . Clause > ( ( interjection ) => ( {
88
- type : "interjection" ,
89
- interjection : {
90
- word : interjection ,
91
- emphasis : headWord . emphasis != null ,
92
- } ,
93
- } ) ) ;
88
+ } )
89
+ . map < English . Clause > ( ( interjection ) => ( {
90
+ type : "interjection" ,
91
+ interjection : {
92
+ word : interjection ,
93
+ emphasis : headWord . emphasis != null ,
94
+ } ,
95
+ } ) ) ;
94
96
}
95
97
}
96
98
}
0 commit comments