changed end of parsing token from eof to completed_parse

This commit is contained in:
alisdair sullivan 2010-05-26 06:36:06 -07:00
parent 1c5f54574c
commit 6deb3160ba
5 changed files with 12 additions and 12 deletions

View file

@ -82,7 +82,7 @@ event({Type, Value}, [{key, Key}, Object|Stack]) ->
event({Type, Value}, [Array|Stack]) when is_list(Array) ->
[[?MODULE:Type(Value)] ++ Array] ++ Stack;
event(eof, [Stack]) ->
event(completed_parse, [Stack]) ->
Stack.

View file

@ -88,7 +88,7 @@ jsx_event({Type, Value}, {Acc, Indent, Level, new}) ->
jsx_event({Type, Value}, {Acc, Indent, Level, key}) ->
{Acc ++ format(Type, Value), Indent, Level, value};
jsx_event(eof, {Acc, _, _, _}) ->
jsx_event(completed_parse, {Acc, _, _, _}) ->
Acc.

View file

@ -57,7 +57,7 @@ event({key, "_id"}, 1) ->
event({string, String}, capture) ->
throw({ok, String});
event(eof, _) ->
event(completed_parse, _) ->
throw(not_found);
event(_, Level) ->