diff --git a/priv/pegjs_parse.pegjs b/priv/pegjs_parse.pegjs index 73634f6..b6ff35f 100644 --- a/priv/pegjs_parse.pegjs +++ b/priv/pegjs_parse.pegjs @@ -497,8 +497,8 @@ hexEscapeSequence unicodeEscapeSequence = "\\u" digits:(hexDigit+) { - [_, {_, Digits0}] = Node, - Digits = lists:foldl( fun(D, Acc) -> <> end + [_, {_, [Digits0]}] = Node, + Digits = lists:foldl( fun([D], Acc) -> <> end , <<>>, Digits0), <<"\\x{", Digits/binary, "}">> } diff --git a/src/pegjs_parse.erl b/src/pegjs_parse.erl index c544665..7ddd78b 100644 --- a/src/pegjs_parse.erl +++ b/src/pegjs_parse.erl @@ -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) -> <> end + [_, {_, [Digits0]}] = Node, + Digits = lists:foldl( fun([D], Acc) -> <> end , <<>>, Digits0), <<"\\x{", Digits/binary, "}">> .