diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbf6ca21848..ca29808a0e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0'] + otp_release: ['OTP-23.3', 'OTP-23.0', 'OTP-22.3', 'OTP-22.0'] development: [false] include: - otp_release: master @@ -58,7 +58,7 @@ jobs: name: Windows, OTP-${{ matrix.otp_release }}, Windows Server 2019 strategy: matrix: - otp_release: ['22.0'] + otp_release: ['22.3'] runs-on: windows-2019 steps: - name: Configure Git @@ -84,7 +84,9 @@ jobs: - name: Erlang test suite run: make --keep-going test_erlang - name: Elixir test suite - run: make --keep-going test_elixir + run: | + del c:/Windows/System32/drivers/etc/hosts + make --keep-going test_elixir check_posix_compliant: name: Check POSIX-compliant diff --git a/lib/elixir/lib/macro.ex b/lib/elixir/lib/macro.ex index 593f77a85d5..36e77469c08 100644 --- a/lib/elixir/lib/macro.ex +++ b/lib/elixir/lib/macro.ex @@ -490,6 +490,23 @@ defmodule Macro do @doc """ Performs a depth-first, pre-order traversal of quoted expressions. + + Returns a new ast where each node is the result of invoking `fun` on each + corresponding node of `ast`. + + ## Examples + + iex> ast = quote do: 5 + 3 * 7 + iex> new_ast = Macro.prewalk(ast, fn + ...> {:+, meta, children} -> {:*, meta, children} + ...> {:*, meta, children} -> {:+, meta, children} + ...> other -> other + ...> end) + iex> Code.eval_quoted(ast) + {26, []} + iex> Code.eval_quoted(new_ast) + {50, []} + """ @spec prewalk(t, (t -> t)) :: t def prewalk(ast, fun) when is_function(fun, 1) do