From 7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 21 Jun 2017 09:41:52 +0200 Subject: xref: Improve handling of Unicode The updates of xref_base:analysis() are cosmetic (the strings are parsed by the Erlang scanner only). --- lib/tools/src/xref_parser.yrl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/tools/src/xref_parser.yrl') diff --git a/lib/tools/src/xref_parser.yrl b/lib/tools/src/xref_parser.yrl index 0711da79e2..5ee6419ff5 100644 --- a/lib/tools/src/xref_parser.yrl +++ b/lib/tools/src/xref_parser.yrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2016. All Rights Reserved. +%% Copyright Ericsson AB 2000-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -170,7 +170,7 @@ is_prefix_op('#') -> numeric; is_prefix_op(_) -> false. check_regexp(String) -> - case re:compile(String) of + case re:compile(String, [unicode]) of {ok, _Expr} -> {regexpr, String}; {error, {ErrString, Position}} -> @@ -274,7 +274,7 @@ mfa2s({M,F,A}) -> [c2s(M),':',c2s(F),'/',A]. c2s(C) -> - [S] = io_lib:format("~p", [C]), + [S] = io_lib:format("~tp", [C]), list_to_atom(S). re(variable) -> ['_']; -- cgit v1.2.3