aboutsummaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-01 12:40:27 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-01 12:40:27 -0700
commit994c9c973e0fd771699c3a5c76bee11f9b744c84 (patch)
tree8257c1abe2d18a50a46a1d712eadbd25fd7e4f8b /types.h
parentcb9b4c40d87480bc794b90c2a36ed0f4c3240d8a (diff)
Changed how definitions work
Diffstat (limited to 'types.h')
-rw-r--r--types.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/types.h b/types.h
index bb491bc..495234f 100644
--- a/types.h
+++ b/types.h
@@ -37,8 +37,9 @@ enum pattype_e {
BP_END_OF_FILE = 22,
BP_END_OF_LINE = 23,
BP_WORD_BOUNDARY = 24,
- BP_LEFTRECURSION = 25,
- BP_ERROR = 26,
+ BP_DEFINITION = 25,
+ BP_LEFTRECURSION = 26,
+ BP_ERROR = 27,
};
struct match_s; // forward declared to resolve circular struct defs
@@ -60,6 +61,11 @@ typedef struct pat_s {
size_t len;
} ref;
struct {
+ const char *name;
+ size_t namelen;
+ struct pat_s *def, *pat;
+ } def;
+ struct {
unsigned char low, high;
} range;
struct {