@@ -66,7 +66,7 @@ const properWords = allAtLeastOnce(
6666 match ( / [ A - Z ] [ a - z A - Z ] * / , "proper word" ) . skip ( spaces ) ,
6767)
6868 . map ( ( array ) => array . join ( " " ) )
69- . map ( ( words ) => ( { type : "proper word" , words, kind : "latin" } ) ) ;
69+ . map ( ( words ) => ( { type : "proper word" , words, kind : "latin" } ) ) ;
7070
7171const specificWord = memoize ( ( thatWord : string ) =>
7272 word . filter ( ( thisWord ) =>
@@ -76,7 +76,7 @@ const specificWord = memoize((thatWord: string) =>
7676) ;
7777const multipleA = specificWord ( "a" )
7878 . with ( count ( allAtLeastOnce ( specificWord ( "a" ) ) ) )
79- . map ( ( count ) => ( { type : "multiple a" , count : count + 1 } ) ) ;
79+ . map ( ( count ) => ( { type : "multiple a" , count : count + 1 } ) ) ;
8080const repeatingLetter = match ( / [ a - z A - Z ] / , "latin letter" )
8181 . then ( memoize ( ( letter ) =>
8282 count ( all ( matchString ( letter ) ) )
@@ -87,15 +87,15 @@ const longWord = allAtLeastOnce(repeatingLetter)
8787 . map ( ( letters ) => {
8888 const word = letters . map ( ( [ letter ] ) => letter ) . join ( "" ) ;
8989 const length = sumOf ( letters , ( [ _ , count ] ) => count ) - word . length + 1 ;
90- return { type : "long word" , word, length } ;
90+ return { type : "long word" , word, length } ;
9191 } )
9292 . filter ( ( { word, length } ) => / ^ [ a - z ] / . test ( word ) && length > 1 ) ;
9393
9494const alaX = memoize ( ( word : string ) =>
9595 sequence ( specificWord ( "ala" ) , specificWord ( word ) ) . map ( ( ) => word )
9696) ;
9797const xAlaX = lazy ( ( ) => settings . xAlaXPartialParsing ? empty : word . then ( alaX ) )
98- . map ( ( word ) => ( { type : "x ala x" , word } ) ) ;
98+ . map ( ( word ) => ( { type : "x ala x" , word } ) ) ;
9999const punctuation = choiceOnlyOne (
100100 allAtLeastOnce (
101101 match ( SENTENCE_TERMINATOR , "punctuation" )
@@ -105,7 +105,7 @@ const punctuation = choiceOnlyOne(
105105 . map ( ( punctuation ) => punctuation . join ( "" ) . replaceAll ( "..." , ELLIPSIS ) ) ,
106106 newline . map ( ( ) => "." ) ,
107107)
108- . map ( ( punctuation ) => ( { type : "punctuation" , punctuation } ) ) ;
108+ . map ( ( punctuation ) => ( { type : "punctuation" , punctuation } ) ) ;
109109const cartoucheElement = choiceOnlyOne (
110110 singleUcsurWord
111111 . skip ( match ( NSK_COLON , "full width colon" ) . skip ( spaces ) ) ,
@@ -141,13 +141,11 @@ const cartouche = specificSpecialUcsur(START_OF_CARTOUCHE)
141141 ) ;
142142const cartouches = allAtLeastOnce ( cartouche )
143143 . map ( ( words ) => words . join ( " " ) )
144- . map ( ( words ) =>
145- ( {
146- type : "proper word" ,
147- words,
148- kind : "cartouche" ,
149- } )
150- ) ;
144+ . map ( ( words ) => ( {
145+ type : "proper word" ,
146+ words,
147+ kind : "cartouche" ,
148+ } ) ) ;
151149const longSpaceContainer = specificSpecialUcsur ( START_OF_LONG_GLYPH )
152150 . with ( count ( spacesWithoutNewline ) . filter ( ( length ) => length > 0 ) )
153151 . skip ( specificSpecialUcsur ( END_OF_LONG_GLYPH ) )
@@ -160,36 +158,34 @@ const spaceLongGlyph = sequence(
160158 longGlyphHead ,
161159 longSpaceContainer ,
162160)
163- . map ( ( [ words , spaceLength ] ) =>
164- ( {
165- type : "space long glyph" ,
166- words,
167- spaceLength,
168- } )
169- ) ;
161+ . map ( ( [ words , spaceLength ] ) => ( {
162+ type : "space long glyph" ,
163+ words,
164+ spaceLength,
165+ } ) ) ;
170166const headedLongGlyphStart = longGlyphHead
171167 . skip ( specificSpecialUcsur ( START_OF_LONG_GLYPH ) )
172168 . skip ( spaces )
173- . map ( ( words ) => ( { type : "headed long glyph start" , words } ) ) ;
169+ . map ( ( words ) => ( { type : "headed long glyph start" , words } ) ) ;
174170const headlessLongGlyphEnd = specificSpecialUcsur ( END_OF_LONG_GLYPH )
175171 . skip ( spaces )
176- . map ( ( ) => ( { type : "headless long glyph end" } ) ) ;
172+ . map ( ( ) => ( { type : "headless long glyph end" } ) ) ;
177173const headlessLongGlyphStart = specificSpecialUcsur ( START_OF_REVERSE_LONG_GLYPH )
178174 . skip ( spaces )
179- . map ( ( ) => ( { type : "headless long glyph end" } ) ) ;
175+ . map ( ( ) => ( { type : "headless long glyph end" } ) ) ;
180176const headedLongGlyphEnd = specificSpecialUcsur ( END_OF_REVERSE_LONG_GLYPH )
181177 . with ( longGlyphHead )
182178 . skip ( spaces )
183- . map ( ( words ) => ( { type : "headed long glyph start" , words } ) ) ;
179+ . map ( ( words ) => ( { type : "headed long glyph start" , words } ) ) ;
184180const insideLongGlyph = specificSpecialUcsur ( END_OF_REVERSE_LONG_GLYPH )
185181 . with ( longGlyphHead )
186182 . skip ( specificSpecialUcsur ( START_OF_LONG_GLYPH ) )
187183 . skip ( spaces )
188- . map ( ( words ) => ( { type : "inside long glyph" , words } ) ) ;
184+ . map ( ( words ) => ( { type : "inside long glyph" , words } ) ) ;
189185const combinedGlyphsToken = combinedGlyphs
190186 . skip ( spaces )
191- . map ( ( words ) => ( { type : "combined glyphs" , words } ) ) ;
192- const wordToken = word . map ( ( word ) => ( { type : "word" , word } ) ) ;
187+ . map ( ( words ) => ( { type : "combined glyphs" , words } ) ) ;
188+ const wordToken = word . map ( ( word ) => ( { type : "word" , word } ) ) ;
193189
194190export const token : Parser < Token > = choiceOnlyOne < Token > (
195191 xAlaX ,
0 commit comments