summaryrefslogtreecommitdiff
path: root/src/stmd.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-09-07 22:48:33 +0200
committerVicent Marti <tanoku@gmail.com>2014-09-09 03:39:16 +0200
commit7426f9ae60272a19bd4611b8579647118033a1e6 (patch)
treed8265b6055052dc42fbf1a3f41454654b1199d2c /src/stmd.h
parent798f58a2b614280201141b398c8e498cecc8ab5e (diff)
Abstract the Block union
Diffstat (limited to 'src/stmd.h')
-rw-r--r--src/stmd.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/stmd.h b/src/stmd.h
index c80eeda..21a86b0 100644
--- a/src/stmd.h
+++ b/src/stmd.h
@@ -96,14 +96,20 @@ struct node_block {
struct node_block* top;
strbuf string_content;
node_inl* inline_content;
+
union {
- struct ListData list_data;
- struct FencedCodeData fenced_code_data;
- int header_level;
- reference** refmap;
- } attributes;
- struct node_block * next;
- struct node_block * prev;
+ struct ListData list;
+ struct FencedCodeData code;
+ struct {
+ int level;
+ } header;
+ struct {
+ reference** refmap;
+ } document;
+ } as;
+
+ struct node_block *next;
+ struct node_block *prev;
};
typedef struct node_block node_block;