removed the default callback handler, replaced it with an anonymous function. also added a shortcut for a decoder with the default handler but custom opts
This commit is contained in:
parent
80112bce4a
commit
7d5ccfd86f
4 changed files with 7 additions and 148 deletions
|
@ -456,10 +456,6 @@ maybe_comment_done(<<>>, Resume) ->
|
|||
|
||||
%% helper function for dispatching of parser events
|
||||
|
||||
callback(eof, {none, Callbacks}) ->
|
||||
lists:reverse(Callbacks);
|
||||
callback(Event, {none, Callbacks}) ->
|
||||
{none, [Event] ++ Callbacks};
|
||||
callback(eof, {{Mod, Function}, State}) ->
|
||||
Mod:Function(eof, State);
|
||||
callback(Event, {{Mod, Function}, State}) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue