diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-12-17 19:49:56 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-12-17 19:49:56 -0800 |
| commit | 06b1a795bb10dd8ed9c2f406ca3b906917e1a106 (patch) | |
| tree | 09731a1b5009c68f3a19cfe89ee7f03d4c786d9c /types.h | |
| parent | b37359b4503d447457646e8f8e01810b6525bd56 (diff) | |
Better null byte handling, simplified match datastructures, and some
misc. cleanup
Diffstat (limited to 'types.h')
| -rw-r--r-- | types.h | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -63,8 +63,9 @@ typedef struct vm_op_s { struct vm_op_s *first, *second; } multiple; struct { - struct vm_op_s *replace_pat; - const char *replacement; + struct vm_op_s *pat; + const char *text; + size_t len; } replace; struct { struct vm_op_s *capture_pat; @@ -81,10 +82,6 @@ typedef struct vm_op_s { typedef struct match_s { // Where the match starts and ends (end is after the last character) const char *start, *end; - union { - const char *name; - const char *replacement; - } value; struct match_s *child, *nextsibling; vm_op_t *op; } match_t; |
