Skip to content

Commit

Permalink
Fix \u Unicode sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Dimandt committed Jul 24, 2014
1 parent 2c83595 commit b527e1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions priv/pegjs_parse.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ hexEscapeSequence
unicodeEscapeSequence
= "\\u" digits:(hexDigit+)
{
[_, {_, Digits0}] = Node,
Digits = lists:foldl( fun(D, Acc) -> <<Acc/binary, D/binary>> end
[_, {_, [Digits0]}] = Node,
Digits = lists:foldl( fun([D], Acc) -> <<Acc/binary, D/binary>> end
, <<>>, Digits0),
<<"\\x{", Digits/binary, "}">>
}
Expand Down
4 changes: 2 additions & 2 deletions src/pegjs_parse.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,8 @@ pegjs_code_497_1(Node, _Idx) ->
-spec pegjs_code_506_1(iolist(), index()) -> parse_result().
pegjs_code_506_1(Node, _Idx) ->

[_, {_, Digits0}] = Node,
Digits = lists:foldl( fun(D, Acc) -> <<Acc/binary, D/binary>> end
[_, {_, [Digits0]}] = Node,
Digits = lists:foldl( fun([D], Acc) -> <<Acc/binary, D/binary>> end
, <<>>, Digits0),
<<"\\x{", Digits/binary, "}">>
.
Expand Down

0 comments on commit b527e1b

Please sign in to comment.