@@ -876,8 +876,18 @@ handle_unary_op(Rest, Line, Column, Kind, Length, Op, Scope, Tokens) ->
876876 Token = {identifier , {Line , Column , nil }, Op },
877877 tokenize (Remaining , Line , Column + Length + Extra , Scope , [Token | Tokens ]);
878878 {Remaining , Extra } ->
879+ NewScope =
880+ % % TODO: Remove these deprecations on Elixir v2.0
881+ case Op of
882+ '~~~' ->
883+ Msg = " ~~ ~ is deprecated. Use Bitwise.bnot/1 instead for clarity" ,
884+ prepend_warning (Line , Column , Msg , Scope );
885+ _ ->
886+ Scope
887+ end ,
888+
879889 Token = {Kind , {Line , Column , nil }, Op },
880- tokenize (Remaining , Line , Column + Length + Extra , Scope , [Token | Tokens ])
890+ tokenize (Remaining , Line , Column + Length + Extra , NewScope , [Token | Tokens ])
881891 end .
882892
883893handle_op ([$: | Rest ], Line , Column , _Kind , Length , Op , Scope , Tokens ) when ? is_space (hd (Rest )) ->
@@ -897,10 +907,6 @@ handle_op(Rest, Line, Column, Kind, Length, Op, Scope, Tokens) ->
897907 Msg = " ^^^ is deprecated. It is typically used as xor but it has the wrong precedence, use Bitwise.bxor/2 instead" ,
898908 prepend_warning (Line , Column , Msg , Scope );
899909
900- '~~~' ->
901- Msg = " ~~ ~ is deprecated. Use Bitwise.bnot/1 instead for clarity" ,
902- prepend_warning (Line , Column , Msg , Scope );
903-
904910 '<|>' ->
905911 Msg = " <|> is deprecated. Use another pipe-like operator" ,
906912 prepend_warning (Line , Column , Msg , Scope );
0 commit comments