diff options
author | Adrian Thurston <thurston@colm.net> | 2018-06-18 14:25:14 +0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-06-18 14:25:14 +0700 |
commit | e706bc4c2a396c3a60658072412e26d9bee83fca (patch) | |
tree | 1dcb55ec10189f69c1575e2a806c0cfef7660dcc /src/bytecode.c | |
parent | 922038be0f1924e7fe6a52a843d090c47bf7d29c (diff) | |
download | colm-e706bc4c2a396c3a60658072412e26d9bee83fca.tar.gz |
added print_tree to stream funcs
Selects between file and collect. Will want to also ensure only called on a
"data" stream_impl.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r-- | src/bytecode.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index b9510ed2..502be2e6 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -2340,10 +2340,7 @@ again: if ( stream->parser == 0 ) { struct stream_impl *si = stream_to_impl( stream ); - if ( si->file != 0 ) - colm_print_tree_file( prg, sp, si, input, false ); - else if ( si->collect != 0 ) - colm_print_tree_collect( prg, sp, si->collect, input, false ); + si->funcs->print_tree( prg, sp, si, input, false ); vm_push_stream( stream ); @@ -2400,10 +2397,7 @@ again: if ( stream->parser == 0 ) { struct stream_impl *si = stream_to_impl( stream ); - if ( si->file != 0 ) - colm_print_tree_file( prg, sp, si, input, false ); - else if ( si->collect != 0 ) - colm_print_tree_collect( prg, sp, si->collect, input, false ); + si->funcs->print_tree( prg, sp, si, input, false ); vm_push_stream( stream ); |