aboutsummaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-17 00:29:11 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-17 00:29:11 -0700
commit67e538e774b37749c53c553b941736a281e6ac8f (patch)
treecc02c6622c831b2cb2dad7e3128e9a9e3dbb3ded /types.h
parent2477d9869c295cbaa1e948fc6e40190aa7149295 (diff)
Some error handling
Diffstat (limited to 'types.h')
-rw-r--r--types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/types.h b/types.h
index 1a19e86..2a1cc2a 100644
--- a/types.h
+++ b/types.h
@@ -76,7 +76,10 @@ 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;
- const char *name_or_replacement;
+ union {
+ const char *name;
+ const char *replacement;
+ } value;
struct match_s *child, *nextsibling;
vm_op_t *op;
} match_t;