irongit

A rust macro that allows regular expression creation through independent files. Allows fully typed named groups.

update readme

huncholanehuncholaneauthored
parent 1744669commit a7afa4821429d5df27e6b2ec89bdb9723620a7ecBrowse files

1 file changed, +5 -3

+5-3README.md
@@ -15,11 +15,13 @@ Call `load_regex_files!` on the directory that contains regex files.
1515 3. `vec_from_str(text: &str)` Extracts all the matches in a given string.
1616 4. `vec_from_file(filename: &str)` Extracts all the matches after opening the given filename.
1717
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.
1919
20----
20+### Tips
21+
22+- Use struct style naming convention for `.re` files. i.e. `Event.re` rather than `event.re`
2123
22-## Benefits
24+### Benefits
2325
2426 - Files load automatically into precompiled code with macros which allows rust-analyzer to use provide type hints.
2527 - Regular expressions can be split over multiple lines and use comments to improve readability for regular expressions.