Melody – A readable language that compiles to regular expressions
Melody was posted here (not by myself), but the project was still in very early stages, and so I wanted to post an update that Melody now has:
- A Babel plugin - https://www.npmjs.com/package/babel-plugin-melody
- NodeJS bindings via WASM - https://www.npmjs.com/package/melodyc
- A playground - https://melody-playground.vercel.app/
- VSCode and JetBrains extensions - https://marketplace.visualstudio.com/items?itemName=yoavlavi.melody https://plugins.jetbrains.com/plugin/18693-melody
- A CLI and REPL
- A documentation book - https://yoav-lavi.github.io/melody/book/
The idea behind Melody is to represent regular expressions in a readable, maintainable format that plays nicely with larger projects, multiple people, diffs and so forth, while adding some QOL features.
See the repository here: https://github.com/yoav-lavi/melody
(
3 comments
| 5 points
| on HN
)
That said, from the example documentation.. <start>;
option of "v";
capture major { some of <digit>; }
".";
capture minor { some of <digit>; }
".";
capture patch { some of <digit>; }
<end>;
// v1.0.0
Show that to someone who isn't familiar with regex, and they'll have no idea what it means.
Someone who is familiar with regex, will likely prefer the regex format.
It's better to just submit links as links.