@@ -362,7 +362,7 @@ defmodule Macro do
362362 end
363363
364364 # Binary ops
365- def to_string ( { op , _ , [ left , right ] } = ast , fun ) when op in @ binary_ops do
365+ def to_string ( { op , _ , [ left , right ] } = ast , fun ) when op in unquote ( @ binary_ops ) do
366366 fun . ( ast , op_to_string ( left , fun , op , :left ) <> " #{ op } " <> op_to_string ( right , fun , op , :right ) )
367367 end
368368
@@ -377,7 +377,7 @@ defmodule Macro do
377377 fun . ( ast , "not " <> to_string ( arg , fun ) )
378378 end
379379
380- def to_string ( { op , _ , [ arg ] } = ast , fun ) when op in @ unary_ops do
380+ def to_string ( { op , _ , [ arg ] } = ast , fun ) when op in unquote ( @ unary_ops ) do
381381 fun . ( ast , atom_to_binary ( op ) <> to_string ( arg , fun ) )
382382 end
383383
@@ -421,7 +421,7 @@ defmodule Macro do
421421 @ kw_keywords [ :do , :catch , :rescue , :after , :else ]
422422
423423 defp kw_blocks? ( [ _ | _ ] = kw ) do
424- Enum . all? ( kw , & match? ( { x , _ } when x in @ kw_keywords , & 1 ) )
424+ Enum . all? ( kw , & match? ( { x , _ } when x in unquote ( @ kw_keywords ) , & 1 ) )
425425 end
426426 defp kw_blocks? ( _ ) , do: false
427427
@@ -488,7 +488,7 @@ defmodule Macro do
488488 "(" <> to_string ( expr , fun ) <> ")"
489489 end
490490
491- defp op_to_string ( { op , _ , [ _ , _ ] } = expr , fun , parent_op , side ) when op in @ binary_ops do
491+ defp op_to_string ( { op , _ , [ _ , _ ] } = expr , fun , parent_op , side ) when op in unquote ( @ binary_ops ) do
492492 { parent_assoc , parent_prec } = binary_op_props ( parent_op )
493493 { _ , prec } = binary_op_props ( op )
494494 cond do
0 commit comments