aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src/xref_parser.yrl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-06-21 09:41:52 +0200
committerSiri Hansen <[email protected]>2017-09-05 11:02:26 +0200
commit7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b (patch)
tree3fa4a2f96f74a6891260526b3f37603c7e460e92 /lib/tools/src/xref_parser.yrl
parent42afeb0c4af0625196c313b309add3a14a2bbb7c (diff)
downloadotp-7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b.tar.gz
otp-7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b.tar.bz2
otp-7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b.zip
xref: Improve handling of Unicode
The updates of xref_base:analysis() are cosmetic (the strings are parsed by the Erlang scanner only).
Diffstat (limited to 'lib/tools/src/xref_parser.yrl')
-rw-r--r--lib/tools/src/xref_parser.yrl6
1 files changed, 3 insertions, 3 deletions
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) -> ['_'];