diff --git a/lib/spitfire.ex b/lib/spitfire.ex index d130be4..439e925 100644 --- a/lib/spitfire.ex +++ b/lib/spitfire.ex @@ -142,6 +142,8 @@ defmodule Spitfire do rescue NoFuelRemaining -> {:error, :no_fuel_remaining} + after + Process.delete(:comma_list_parsers) end def parse!(code, opts \\ []) do @@ -1379,6 +1381,8 @@ defmodule Spitfire do aliases = [alias | aliases] {{:__aliases__, [{:last, Process.get(:alias_last_meta)} | meta], aliases}, parser} + after + Process.delete(:alias_last_meta) end defp parse_bitstring(%{current_token: {:"<<", _}} = parser) do diff --git a/lib/spitfire/env.ex b/lib/spitfire/env.ex index 75996e8..921fd14 100644 --- a/lib/spitfire/env.ex +++ b/lib/spitfire/env.ex @@ -49,6 +49,8 @@ defmodule Spitfire.Env do ) {ast, state, env, cursor_env} + after + Process.delete(:cursor_env) end defp expand({:__cursor__, _meta, _} = node, state, env) do