2 ms·
Interesting. This is pretty much parser combinator syntax but restricted to regexes. DX-wise, I'd just prefer a parser combinator library. In practice this pro
by jokethrowaway 6y ago
Interesting. This is pretty much parser combinator syntax but restricted to regexes.
DX-wise, I'd just prefer a parser combinator library.
In practice this probably compiles to a regex for performance reasons: a JS parser is probably much slower than hooking JS to a C regex library.
In a faster (compiled) language you don't have this limit, eg. Haskell and Rust have several popular parser combinators libraries.