aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src/xref_parser.yrl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2010-03-03 09:44:34 +0000
committerErlang/OTP <[email protected]>2010-03-03 09:44:34 +0000
commitf94ff4fb58b9db3926ce0fea2c0fb4b18b1823ca (patch)
tree10f69dc132d379d9c36a9697801ab83f709af5c7 /lib/tools/src/xref_parser.yrl
parent4ce2c1bd3ed90e6f1c208b4749ee33ae4ee9d723 (diff)
downloadotp-f94ff4fb58b9db3926ce0fea2c0fb4b18b1823ca.tar.gz
otp-f94ff4fb58b9db3926ce0fea2c0fb4b18b1823ca.tar.bz2
otp-f94ff4fb58b9db3926ce0fea2c0fb4b18b1823ca.zip
OTP-8472 tools: xref: re/regexp
Xref has been updated to use the re module instead of the deprecated regexp module.
Diffstat (limited to 'lib/tools/src/xref_parser.yrl')
-rw-r--r--lib/tools/src/xref_parser.yrl17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/tools/src/xref_parser.yrl b/lib/tools/src/xref_parser.yrl
index e23dce1dec..1279ece061 100644
--- a/lib/tools/src/xref_parser.yrl
+++ b/lib/tools/src/xref_parser.yrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -169,12 +169,11 @@ is_prefix_op('#') -> numeric;
is_prefix_op(_) -> false.
check_regexp(String) ->
- case regexp:parse(String) of
+ case re:compile(String) of
{ok, _Expr} ->
{regexpr, String};
- {error, Reason} ->
- F = regexp:format_error(Reason),
- return_error(0, ["invalid_regexp", String, F])
+ {error, {ErrString, Position}} ->
+ return_error(Position, ["invalid_regexp", String, ErrString])
end.
check_regexp_variable('_') ->