Module

Macro

Changes by version

Elixir 1.19.1

· 1 change

Bugfix Tool: Elixir

Do not escape options given to dbg/2

Elixir 1.19.0

· 2 changes

Enhancement Tool: Elixir

Print debugging results from Macro.dbg/3 as they happen, instead of once at the end

Enhancement Tool: Elixir

Add __escape__/1 callback so structs can escape references and other runtime data types in Macro.escape/1

Elixir 1.18.0

· 3 changes

Enhancement Tool: Elixir

Improve dbg handling of if/2, with/1 and of code blocks

Enhancement Tool: Elixir

Add Macro.struct_info!/2 to return struct information mirroring mod.__info__(:struct)

Enhancement Tool: Elixir

Macro.struct!/2 is deprecated in favor of Macro.struct_info!/2

Elixir 1.17.0

· 1 change

Enhancement Tool: Elixir

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

Elixir 1.16.0

· 2 changes

Enhancement Tool: Elixir

Add Macro.compile_apply/4

Bugfix Tool: Elixir

Address exception on Macro.to_string/1 for certain ASTs

Elixir 1.15.0

· 1 change

Enhancement Tool: Elixir

Improve error message when piping into an expression ending in bracket-based access

Elixir 1.14.3

· 2 changes

Bugfix Tool: Elixir

Fix Macro.to_string/1 for large negative integers

Bugfix Tool: Elixir

Properly type and escape expansion of __ENV__ in macros

Elixir 1.14.1

· 2 changes

Enhancement Tool: Elixir

Add Macro.expand_literals/2 and Macro.expand_literals/3

Enhancement Tool: Elixir

Fix error in Macro.to_string/2 when converting an AST with :erlang.binary_to_atom/2

Elixir 1.14.0

· 2 changes

Enhancement Tool: Elixir

Add Macro.classify_atom/1 and Macro.inspect_atom/2

Enhancement Tool: Elixir

Add Macro.expand_literal/2 and Macro.path/2

Elixir 1.13.3

· 1 change

Bugfix Tool: Elixir

Fix error on Macro.to_string/1 when the plain alias Elixir is given

Elixir 1.13.1

· 2 changes

Bugfix Tool: Elixir

Set a max line_length for Macro.to_string/1

Bugfix Tool: Elixir

Fix formatting of lists on module attributes for Macro.to_string/1

Elixir 1.13.0

· 2 changes

Enhancement Tool: Elixir

Add Macro.prewalker/1 and Macro.postwalker/1

Enhancement Tool: Elixir

Macro.to_string/2 is deprecated, use Macro.to_string/1 instead

Elixir 1.12.1

· 1 change

Bugfix Tool: Elixir

Revert keeping of underscores between digits in camelize

Elixir 1.12.0

· 6 changes

Enhancement Tool: Elixir

Add export dependencies on Macro.struct!/2

Enhancement Tool: Elixir

Support :newline to customize newlines escaping in Macro.unescape_string/2

Bugfix Tool: Elixir

Macro.decompose_call/1 now also consider tuples with more than 2 elements to not be valid calls

Bugfix Tool: Elixir

Fix Macro.to_string/1 double-escaping of escape characters in sigils

Bugfix Tool: Elixir

Fix Macro.underscore/1 on digits preceded by capitals: "FOO10" now becomes "foo10" instead of "fo_o10"

Bugfix Tool: Elixir

Preserve underscores between digits on Macro.underscore/1

Elixir 1.11.3

· 1 change

Enhancement Tool: Elixir

Add Macro.unique_var/2 and Macro.generate_unique_arguments/2

Elixir 1.10.2

· 1 change

Bugfix Tool: Elixir

Fix a bug where Macro.to_string/1 would emit invalid code for sigils

Elixir 1.8.0

· 1 change

Enhancement Tool: Elixir

Add Macro.struct!/2 for proper struct resolution during compile time

Elixir 1.7.0

· 1 change

Enhancement Tool: Elixir

Add Macro.special_form?/2 and Macro.operator?/2 that returns true if the given name/arity is a special form or operator respectively

Elixir 1.6.5

· 1 change

Bugfix Tool: Elixir

Make sure Macro.to_string/2 emits valid quoted expressions

Elixir 1.6.1

· 1 change

Bugfix Tool: Elixir

Reorder kw blocks in Macro.to_string/1 to avoid warnings

Elixir 1.6.0

· 2 changes

Bugfix Tool: Elixir

Fix Macro.to_string/2 for tuple calls, such as alias Foo.{Bar, Baz}

Enhancement Tool: Elixir

Macro.unescape_tokens/1 and Macro.unescape_tokens/2 are deprecated in favor of Enum.map/2

Elixir 1.5.0

· 1 change

Enhancement Tool: Elixir

Introduce Macro.generate_arguments/2

Elixir 1.4.0

· 2 changes

Bugfix Tool: Elixir

Wrap fn calls in parens in Macro.to_string/2

Bugfix Tool: Elixir

Do not print aliases as keys inside keyword lists in Macro.to_string/2

Elixir 1.3.0

· 1 change

Bugfix Tool: Elixir

Fix Macro.to_string/1 on a call of a capture argument, for example &(&1).(:x)

Elixir 1.2.1

· 1 change

Enhancement Tool: Elixir

Fix a bug in Macro.to_string/1 where a remote function could be accidentally interpreted as a sigil

Elixir 1.2.0

· 3 changes

Enhancement Tool: Elixir

Add Macro.traverse/4 that performs pre and post-walk at once

Enhancement Tool: Elixir

Add Macro.camelize/1 and Macro.underscore/1

Bugfix Tool: Kernel

Ensure Macro.to_string/2 respects operator precedence when using the access operator

Elixir 1.1.0

· 1 change

Bugfix Tool: Elixir

Properly convert captures in Macro.to_string/1

Elixir 0.15.1

· 2 changes

Enhancement Tool: Elixir

Add Macro.validate/1 to recursively check if a value is a valid quoted expression

Enhancement Tool: Elixir

Ensure bitstrings work with Macro.escape/1

Elixir 0.14.3

· 1 change

Enhancement Tool: Elixir

to_string correctly displays sigils

Elixir 0.13.3

· 1 change

Enhancement Tool: Elixir

Add Macro.prewalk/2/3 and Macro.postwalk/2/3

Elixir 0.13.2

· 1 change

Enhancement Tool: Elixir

Macro.safe_terms/1 is deprecated

Elixir 0.13.1

· 1 change

Enhancement Tool: Elixir

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

Elixir 0.13.0

· 1 change

Enhancement Tool: Elixir

Macro.to_string/2 considers proper precedence when translating !(foo > bar) into a string

Elixir 0.12.0

· 1 change

Enhancement Tool: Elixir

Macro.extract_args/1 is deprecated in favor of Macro.decompose_call/1

Elixir 0.11.0

· 2 changes

Enhancement Tool: Elixir

Add Macro.pipe/3 and Macro.unpipe/1 for building pipelines

Enhancement Tool: Elixir

Macro.expand_all/2 is deprecated

Elixir 0.10.2

· 4 changes

Enhancement Tool: Elixir

Improve printing of the access protocol on Macro.to_string/1

Enhancement Tool: Elixir

Add Macro.to_string/2 to support annotations on the converted string

Enhancement Tool: Elixir

Macro.escape/2 can now escape improper lists

Enhancement Tool: Elixir

Macro.unescape_binary/1 and Macro.unescape_binary/2 are deprecated in favor of Macro.unescape_string/1 and Macro.unescape_string/2