Skip to content

Commit ca06991

Browse files
committed
fix
1 parent 9156986 commit ca06991

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/parser/lexer.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ const longWord = allAtLeastOnce(repeatingLetter)
9494
})
9595
.filter(({ word }) => /^[a-z]/.test(word))
9696
.filter(({ length }) => length > 1);
97-
const xAlaX = lazy(() =>
98-
settings.xAlaXPartialParsing ? empty : word
99-
.then(memoize((word) =>
100-
sequence(specificWord("ala"), specificWord(word)).map(() => word)
101-
))
102-
)
97+
const alaX = memoize((word: string) =>
98+
sequence(specificWord("ala"), specificWord(word)).map(() => word)
99+
);
100+
const xAlaX = lazy(() => settings.xAlaXPartialParsing ? empty : word.then(alaX))
103101
.map((word) => ({ type: "x ala x", word }) as const);
104102
const punctuation = choiceOnlyOne(
105103
allAtLeastOnce(

0 commit comments

Comments
 (0)