Skip to content

Commit 172bfdb

Browse files
author
José Valim
committed
Revert "Merge pull request #2702 from alexrp/master"
<~ is already a valid expression in Elixir. This reverts commit 2c741ec, reversing changes made to 12a4578.
1 parent 2c741ec commit 172bfdb

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

lib/elixir/lib/macro.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ defmodule Macro do
1717
:<, :>, :->,
1818
:+, :-, :*, :/, :=, :|, :.,
1919
:and, :or, :when, :in,
20-
:~>>, :~>, :<~, :<~>, :|~>, :<|>,
2120
:<<<, :>>>, :|||, :&&&, :^^^, :~~~]
2221

2322
@doc false
@@ -40,8 +39,7 @@ defmodule Macro do
4039
o when o in [:&&, :&&&, :and] -> {:left, 140}
4140
o when o in [:==, :!=, :=~, :===, :!==] -> {:left, 150}
4241
o when o in [:<, :<=, :>=, :>] -> {:left, 160}
43-
o when o in [:|>, :<<<, :>>>, :~>>, :~>,
44-
:<~, :<~>, :|~>, :<|>] -> {:left, 170}
42+
o when o in [:|>, :<<<, :>>>] -> {:left, 170}
4543
:in -> {:left, 180}
4644
o when o in [:++, :--, :.., :<>] -> {:right, 200}
4745
o when o in [:+, :-] -> {:left, 210}

lib/elixir/src/elixir_parser.yrl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ Left 140 and_op_eol. %% &&, &&&, and
5959
Left 150 comp_op_eol. %% ==, !=, =~, ===, !==
6060
Left 160 rel_op_eol. %% <, >, <=, >=
6161
Left 170 arrow_op_eol. %% < (op), (op) > (e.g |>, <<<, >>>)
62-
%% ~>>, ~>, <~, <~>, |~>, <|>
6362
Left 180 in_op_eol. %% in
6463
Right 200 two_op_eol. %% ++, --, .., <>
6564
Left 210 add_op_eol. %% + (op), - (op)

lib/elixir/src/elixir_tokenizer.erl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@
3333

3434
-define(arrow_op3(T1, T2, T3),
3535
T1 == $<, T2 == $<, T3 == $<;
36-
T1 == $>, T2 == $>, T3 == $>;
37-
T1 == $~, T2 == $>, T3 == $>;
38-
T1 == $<, T2 == $~, T3 == $>;
39-
T1 == $|, T2 == $~, T3 == $>;
40-
T1 == $<, T2 == $|, T3 == $>).
36+
T1 == $>, T2 == $>, T3 == $>).
4137

4238
-define(arrow_op(T1, T2),
43-
T1 == $|, T2 == $>;
44-
T1 == $~, T2 == $>;
45-
T1 == $<, T2 == $~).
39+
T1 == $|, T2 == $>).
4640

4741
-define(rel_op(T),
4842
T == $<;

0 commit comments

Comments
 (0)