diff options
author | John MacFarlane <[email protected]> | 2014-12-13 14:13:58 -0800 |
---|---|---|
committer | John MacFarlane <[email protected]> | 2014-12-13 19:40:21 -0800 |
commit | a3030f985a973b3b835645313fdad1a8a72ff432 (patch) | |
tree | e1b1b43b16102b106bc43f4dd5eee32bb11b2a73 /src/iterator.h | |
parent | 8d6efe632aaeb1831c86b27e120a344c5e3ee7d4 (diff) |
Added iterator interface to API, removed cmark_walk.
* Added `iterator.c`, `iterator.h`.
* Removed `cmark_walk`.
* Replaced `cmark_walk` with iterator in HTML renderer.
* Replaced API test for `cmark_walk` with simple iterator test.
Diffstat (limited to 'src/iterator.h')
-rw-r--r-- | src/iterator.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/iterator.h b/src/iterator.h new file mode 100644 index 0000000..bf53112 --- /dev/null +++ b/src/iterator.h @@ -0,0 +1,21 @@ +#ifndef CMARK_ITERATOR_H +#define CMARK_ITERATOR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cmark.h" +#include "node.h" + +struct cmark_iter { + cmark_node *current; + cmark_node *root; + cmark_event_type event_type; +}; + +#ifdef __cplusplus +} +#endif + +#endif |