summaryrefslogtreecommitdiff
path: root/src/input.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-07-06 18:33:42 +0800
committerAdrian Thurston <thurston@colm.net>2018-07-06 18:33:42 +0800
commit975d403f75b2dfa2b8de57021614759ce5ae9d3f (patch)
treeec209244debe87cece097cce7130facb13a32856 /src/input.h
parent967a1d439c416643f341aa766bfac3b5943ee9fa (diff)
downloadcolm-975d403f75b2dfa2b8de57021614759ce5ae9d3f.tar.gz
some better organization of the stream funcs
Diffstat (limited to 'src/input.h')
-rw-r--r--src/input.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input.h b/src/input.h
index 1fc5d71e..ac727c81 100644
--- a/src/input.h
+++ b/src/input.h
@@ -84,12 +84,16 @@ struct stream_funcs \
{ \
int (*get_parse_block)( struct colm_program *prg, struct stream_impl *si, int *pskip, char **pdp, int *copied ); \
int (*get_data)( struct colm_program *prg, struct stream_impl *si, char *dest, int length ); \
+\
int (*consume_data)( struct colm_program *prg, struct stream_impl *si, int length, struct colm_location *loc ); \
- struct colm_tree *(*consume_tree)( struct colm_program *prg, struct stream_impl *si ); \
- struct LangEl *(*consume_lang_el)( struct colm_program *prg, struct stream_impl *si, long *bind_id, char **data, long *length ); \
int (*undo_consume_data)( struct colm_program *prg, struct stream_impl *si, const char *data, int length ); \
+\
+ struct colm_tree *(*consume_tree)( struct colm_program *prg, struct stream_impl *si ); \
void (*undo_consume_tree)( struct colm_program *prg, struct stream_impl *si, struct colm_tree *tree, int ignore ); \
+\
+ struct LangEl *(*consume_lang_el)( struct colm_program *prg, struct stream_impl *si, long *bind_id, char **data, long *length ); \
void (*undo_consume_lang_el)( struct colm_program *prg, struct stream_impl *si ); \
+\
int (*get_data_source)( struct colm_program *prg, struct stream_impl *si, char *dest, int length ); \
void (*set_eof)( struct colm_program *prg, struct stream_impl *si ); \
void (*unset_eof)( struct colm_program *prg, struct stream_impl *si ); \