diff options
author | JSDurand <mmemmew@gmail.com> | 2022-01-04 11:51:58 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-01-04 11:51:58 +0800 |
commit | 55dc897da6e81f2a26cfc7e66ac942824773498b (patch) | |
tree | fce0d7d57832907c991d551833bf5eecde947dd2 /src/str_partial.h | |
parent | 53b8b6ffab5a968db75e9babddf4e2dbb2c688a3 (diff) |
temporary commit
Now we can read grammars from a file.
But we need to check if it works for reading strings still.
Diffstat (limited to 'src/str_partial.h')
-rw-r--r-- | src/str_partial.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/str_partial.h b/src/str_partial.h new file mode 100644 index 0000000..9d4fbd6 --- /dev/null +++ b/src/str_partial.h @@ -0,0 +1,13 @@ +#include "str.h" + +/* This is meant to be extended, and only has minimal necessary + fields. */ + +typedef str_info (*info_getter) (str *, UNUM); + +struct str_s { + UNUM size; /* the size in bytes, not in chars */ + char *data; /* a void pointer is too general */ + /* polymorphic behaviour */ + info_getter getter; +}; |