@@ -1161,23 +1161,19 @@ format_error({invalid_alias, Expr}) ->
11611161 " it at runtime. If instead you wanted to invoke a function or access a field, "
11621162 " wrap the function or field name in double quotes" ,
11631163 io_lib :format (Message , ['Elixir.Macro' :to_string (Expr )]);
1164- format_error ({op_ambiguity , Name , { Op , _ , [ Arg ]} }) ->
1164+ format_error ({op_ambiguity , Name , Arg }) ->
11651165 NameString = atom_to_binary (Name , utf8 ),
1166- OpString = atom_to_binary (Op , utf8 ),
11671166 ArgString = 'Elixir.Macro' :to_string (Arg ),
11681167
11691168 Message =
1170- " \" ~ts ~ts~ts \" looks like a function call but there is a variable named \" ~ts \" .\n "
1169+ " \" ~ts ~ts \" looks like a function call but there is a variable named \" ~ts \" . "
11711170 " If you want to perform a function call, use parentheses:\n "
11721171 " \n "
1173- " ~ts (~ts~ts )\n "
1172+ " ~ts (~ts )\n "
11741173 " \n "
1175- " If you want to perform an operation on the variable ~ts , use even spaces instead:\n "
1176- " \n "
1177- " ~ts ~ts ~ts " ,
1178- io_lib :format (Message , [NameString , OpString , ArgString , NameString ,
1179- NameString , OpString , ArgString , NameString ,
1180- NameString , OpString , ArgString ]);
1174+ " If you want to perform an operation on the variable ~ts , use spaces "
1175+ " around the unary operator" ,
1176+ io_lib :format (Message , [NameString , ArgString , NameString , NameString , ArgString , NameString ]);
11811177format_error ({invalid_clauses , Name }) ->
11821178 Message =
11831179 " the function \" ~ts \" cannot handle clauses with the -> operator because it is not a macro. "
0 commit comments