We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9156986 commit ca06991Copy full SHA for ca06991
src/parser/lexer.ts
@@ -94,12 +94,10 @@ const longWord = allAtLeastOnce(repeatingLetter)
94
})
95
.filter(({ word }) => /^[a-z]/.test(word))
96
.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
-)
+const alaX = memoize((word: string) =>
+ sequence(specificWord("ala"), specificWord(word)).map(() => word)
+);
+const xAlaX = lazy(() => settings.xAlaXPartialParsing ? empty : word.then(alaX))
103
.map((word) => ({ type: "x ala x", word }) as const);
104
const punctuation = choiceOnlyOne(
105
allAtLeastOnce(
0 commit comments