File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { equal } from "@std/assert/equal" ;
21import { IterableResult } from "../compound.ts" ;
32import { mapNullable , nullableAsArray } from "../misc/misc.ts" ;
43import * as TokiPona from "../parser/ast.ts" ;
@@ -409,11 +408,11 @@ export function multiplePhrases(
409408 ) ;
410409 }
411410 if ( phrase . every ( ( phrase ) => phrase . type === "noun" ) ) {
412- const firstAdverbial = phrase [ 0 ] . adverbialModifier ;
413- const allEqual = phrase . slice ( 1 ) . every ( ( phrase ) =>
414- equal ( phrase . adverbialModifier , firstAdverbial )
415- ) ;
416- if ( allEqual ) {
411+ if (
412+ phrase . every ( ( phrase ) =>
413+ adverbialIsNone ( phrase . adverbialModifier )
414+ )
415+ ) {
417416 return {
418417 type : "noun" ,
419418 // TODO: flatten compound nouns on the grammar fixer
@@ -422,7 +421,7 @@ export function multiplePhrases(
422421 conjunction,
423422 nouns : phrase . map ( ( { noun } ) => noun ) ,
424423 } ,
425- adverbialModifier : firstAdverbial ,
424+ adverbialModifier : { adverbs : [ ] , inWayPhrase : null } ,
426425 } ;
427426 } else {
428427 return null ;
You can’t perform that action at this time.
0 commit comments