Do not escape options given to dbg/2
Module
Macro
59 changes across 36 versions
Changes by version
Print debugging results from Macro.dbg/3 as they happen, instead of once at the end
Add __escape__/1 callback so structs can escape references and other runtime data types in Macro.escape/1
Improve dbg handling of if/2, with/1 and of code blocks
Add Macro.struct_info!/2 to return struct information mirroring mod.__info__(:struct)
Macro.struct!/2 is deprecated in favor of Macro.struct_info!/2
Add Macro.Env.define_alias/4, Macro.Env.define_import/4, Macro.Env.define_require/4, Macro.Env.expand_alias/4, Macro.Env.expand_import/5, and Macro.Env.expand_require/6 to aid the implementation of language servers and embedded languages
Add Macro.compile_apply/4
Address exception on Macro.to_string/1 for certain ASTs
Improve error message when piping into an expression ending in bracket-based access
Fix Macro.to_string/1 for large negative integers
Properly type and escape expansion of __ENV__ in macros
Add Macro.expand_literals/2 and Macro.expand_literals/3
Fix error in Macro.to_string/2 when converting an AST with :erlang.binary_to_atom/2
Add Macro.classify_atom/1 and Macro.inspect_atom/2
Add Macro.expand_literal/2 and Macro.path/2
Fix error on Macro.to_string/1 when the plain alias Elixir is given
Set a max line_length for Macro.to_string/1
Fix formatting of lists on module attributes for Macro.to_string/1
Add Macro.prewalker/1 and Macro.postwalker/1
Macro.to_string/2 is deprecated, use Macro.to_string/1 instead
Revert keeping of underscores between digits in camelize
Add export dependencies on Macro.struct!/2
Support :newline to customize newlines escaping in Macro.unescape_string/2
Macro.decompose_call/1 now also consider tuples with more than 2 elements to not be valid calls
Fix Macro.to_string/1 double-escaping of escape characters in sigils
Fix Macro.underscore/1 on digits preceded by capitals: "FOO10" now becomes "foo10" instead of "fo_o10"
Preserve underscores between digits on Macro.underscore/1
Add Macro.unique_var/2 and Macro.generate_unique_arguments/2
Fix a bug where Macro.to_string/1 would emit invalid code for sigils
Add Macro.struct!/2 for proper struct resolution during compile time
Add Macro.special_form?/2 and Macro.operator?/2 that returns true if the given name/arity is a special form or operator respectively
Make sure Macro.to_string/2 emits valid quoted expressions
Reorder kw blocks in Macro.to_string/1 to avoid warnings
Fix Macro.to_string/2 for tuple calls, such as alias Foo.{Bar, Baz}
Macro.unescape_tokens/1 and Macro.unescape_tokens/2 are deprecated in favor of Enum.map/2
Introduce Macro.generate_arguments/2
Wrap fn calls in parens in Macro.to_string/2
Do not print aliases as keys inside keyword lists in Macro.to_string/2
Fix Macro.to_string/1 on a call of a capture argument, for example &(&1).(:x)
Fix a bug in Macro.to_string/1 where a remote function could be accidentally interpreted as a sigil
Add Macro.traverse/4 that performs pre and post-walk at once
Add Macro.camelize/1 and Macro.underscore/1
Ensure Macro.to_string/2 respects operator precedence when using the access operator
Properly convert captures in Macro.to_string/1
Add Macro.validate/1 to recursively check if a value is a valid quoted expression
Ensure bitstrings work with Macro.escape/1
to_string correctly displays sigils
Add Macro.prewalk/2/3 and Macro.postwalk/2/3
Macro.safe_terms/1 is deprecated
Macro.unpipe/1 now returns tuples and Macro.pipe/2 was removed in favor of Macro.pipe/3 which explicitly expects the second element of the tuple returned by the new Macro.unpipe/1
Macro.to_string/2 considers proper precedence when translating !(foo > bar) into a string
Macro.extract_args/1 is deprecated in favor of Macro.decompose_call/1
Add Macro.pipe/3 and Macro.unpipe/1 for building pipelines
Macro.expand_all/2 is deprecated
Improve printing of the access protocol on Macro.to_string/1
Add Macro.to_string/2 to support annotations on the converted string
Macro.escape/2 can now escape improper lists
Macro.unescape_binary/1 and Macro.unescape_binary/2 are deprecated in favor of Macro.unescape_string/1 and Macro.unescape_string/2