izafe working on upcoming diacritics function

This commit is contained in:
Bill D 2021-05-13 22:40:41 +03:00
parent 9f9edde731
commit c5c9ea86d2
1 changed files with 3 additions and 6 deletions

View File

@ -399,13 +399,10 @@ function processPhoneme(
overwriteP(wasla), overwriteP(wasla),
)(state) )(state)
: (phs === PhonemeStatus.Izafe) ? : (phs === PhonemeStatus.Izafe) ?
(console.log(pipe( pipe(
reverseP, reverseP,
addP(zer), addP(zer),
)(state), phoneme), pipe( )(state)
reverseP,
addP(zer),
)(state))
: :
// phs === PhonemeState.ShortVowel // phs === PhonemeState.ShortVowel
pipe( pipe(
@ -496,7 +493,7 @@ function advanceP(state: DiacriticsAccumulator, n: number = 1): DiacriticsAccumu
function reverseP(state: DiacriticsAccumulator): DiacriticsAccumulator { function reverseP(state: DiacriticsAccumulator): DiacriticsAccumulator {
return { return {
pIn: state.pIn + state.pOut.slice(-1), pIn: state.pOut.slice(-1) + state.pIn,
pOut: state.pOut.slice(0, -1), pOut: state.pOut.slice(0, -1),
}; };
} }