A rust macro that allows regular expression creation through independent files. Allows fully typed named groups.
update readme
1 file changed, +5 -3
+5-3README.md
| @@ -15,11 +15,13 @@ Call `load_regex_files!` on the directory that contains regex files. | ||
| 15 | 15 | 3. `vec_from_str(text: &str)` Extracts all the matches in a given string. |
| 16 | 16 | 4. `vec_from_file(filename: &str)` Extracts all the matches after opening the given filename. |
| 17 | 17 | |
| 18 | -The abstract class for matches within the regex_macro library contains `start_pos`, `end_pos`, and public fields for each named group inside of the `.re` file. Each field then contains a `start_pos`, `end_pos`, and `val` field. | |
| 18 | +The abstract struct for matches within the regex_macro library contains `start_pos`, `end_pos`, and public fields for each named group inside of the `.re` file. Each field then contains a `start_pos`, `end_pos`, and `val` field. | |
| 19 | 19 | |
| 20 | ---- | |
| 20 | +### Tips | |
| 21 | + | |
| 22 | +- Use struct style naming convention for `.re` files. i.e. `Event.re` rather than `event.re` | |
| 21 | 23 | |
| 22 | -## Benefits | |
| 24 | +### Benefits | |
| 23 | 25 | |
| 24 | 26 | - Files load automatically into precompiled code with macros which allows rust-analyzer to use provide type hints. |
| 25 | 27 | - Regular expressions can be split over multiple lines and use comments to improve readability for regular expressions. |