nitely / nim-regex

Pure Nim regex engine. Guarantees linear time matching
https://nitely.github.io/nim-regex/
MIT License
227 stars 20 forks source link

Macro without static #78

Closed nitely closed 3 years ago

nitely commented 3 years ago

This removes static usage from the NFA macro. There are at least two reasons for this: static Regex is too buggy, and using the macro version for the common function calls match, find, etc is not a good idea. It seems a lot better to provide explicit macros like macro `~=`(txt, exp: string) that can be used as if "foo" ~= r"\w+": discard.

The initial commit contains hacks, but works.