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:
alisdair sullivan 2010-05-26 01:05:16 -07:00
parent 80112bce4a
commit 7d5ccfd86f
4 changed files with 7 additions and 148 deletions

View file

@ -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}) ->