Commit Graph
48 Commits
Author SHA1 Message Date
Fernando Tapia Rico c4427d725b Fix unused variable warning (#8049) 2018-08-05 10:36:32 +02:00
Michał Muskała d76f150274 Use scoped deterministic counters in AST expansion
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2018-08-04 12:56:01 +02:00
Peter Caisse 5025f51f6e Improve the wording in alias error messages (#6623) 2017-10-01 21:16:50 +02:00
José Valim 9d3b4cac92 Use __info__ and module_info where appropriate 2017-09-02 23:35:23 +02:00
José Valim 0b0ab9f8ef Add Code.Identifier to hold shared identifier logic throughout Elixir 2017-08-22 13:22:26 +02:00
José Valim 579f93bcc7 Ensure elixir_erl:debug_info/4 does not require elixir running (#6401) 2017-07-29 17:27:05 +02:00
Andrea Leopardi 131b412a6a Rename KV to Opts in the Erlang part of the codebase (#5795) 2017-02-19 22:29:13 +01:00
Aleksei Magusev a729847db6 Rename m/2 helper macro to key/2 in the main header file 2017-02-19 21:56:05 +01:00
Aleksei Magusev 10d34f6d9c Fix removal of aliases (#5591)
* Remove unnecessary lists:keymember/3 call in elixir_aliases

* Fix removal of aliases
2016-12-27 20:57:54 +01:00
eksperimental 4ceb41e71b Formmating: Add white space around vertical bar (#4507) 2016-04-25 00:55:49 +02:00
Aleksei Magusev 19c40ec584 Favor local calls inside modules 2015-10-24 00:49:45 +02:00
José Valim 8aa8fdf93d Make it clear about top-level cases 2015-10-22 01:52:42 +02:00
Gabriel Jaldon 1818287700 Grammar fix for error message returned by :elixir_aliases.format_error/2 2015-10-20 04:05:55 +08:00
José Valim 89d2b916c1 Provide better error messages for context modules 2015-10-19 00:19:34 +02:00
Hubert Łępicki d9a8a2a93d cleaner (?) error messages when attempting to use the module from the same module 2015-10-18 21:58:07 +02:00
José Valim 80fd98f01a Streamline aliases and imports in lexical tracker
Aliases should not mark nodes as compile or runtime
since it receives the alias to be expanded. The
expanded alias is always called later though as a
remote dispatch.

Imports should always mark nodes as compile time,
since they are compile time dependencies.

Finally, ensure compile nodes have higher priority
over runtime ones.
2015-07-22 09:59:31 +02:00
José Valim d25d7046e5 Split compile and runtime in lexical tracker 2015-07-21 23:28:07 +02:00
José Valim 3ab1db6740 Move Protocol consolidation up to the Protocol module 2014-05-24 18:28:48 +02:00
José Valim c435dbe38d Convert #elixir_env to a struct too 2014-04-30 16:32:13 +02:00
José Valim 56f15d9f4e Do not add spaces after { and before }
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
José Valim 254065d3c4 Clean up synax_error, asstions and merge mechanisms 2013-12-29 14:22:45 +01:00
José Valim 67eeedfb1d Expand requires and imports 2013-12-22 11:31:25 +01:00
José Valim d39401e2d3 Start expanding aliases on their own 2013-12-18 10:40:42 +01:00
José Valim f62c26b9b6 Ensure record aliases in the same quote can be accessed, closes #1915
This commit also simplifies macro expansion for both imports and aliases
to always give higher preference to the macro environment rather than
the caller one, if such is available. The deal is to simplify both the
code and understanding of how macros work.
2013-12-07 20:01:11 +01:00
José Valim d7179b404b Port module_nesting handler to Elixir 2013-11-24 13:42:01 +01:00
José Valim a8bdd19a03 Implement defmodule in Elixir 2013-11-24 11:53:41 +01:00
José Valim 720d1e2a71 Refactor aliases handling before we move defmodule to Kernel 2013-11-24 09:33:38 +01:00
José Valim e65eee49c4 Make inspect in general 20% faster
There are two main optimizations:

1. We have optimized Module.concat/2 (it is roughly 100% faster)
2. We have optimized rendering of Inspect.Algebra by skipping
   the intermediate s_doc representation. This reduces memory
   allocation and skips one extra pass on rendering.
2013-11-19 10:21:31 +01:00
José Valim d856e667b9 Add warnings for unused aliases 2013-11-01 16:03:12 +01:00
José Valim b87797f788 Return Foo for __MODULE__.Foo outside of a module 2013-06-16 13:10:59 +02:00
Jonathan J Hunt 636da42f2a Don't ignore nil during aliasing. Attempt to fix #1159 2013-05-31 15:58:15 -07:00
José Valim 2c98c0999d An Elixir module now translates to Elixir.Module instead of Elixir-Module 2013-05-23 14:36:56 +02:00
José Valim 9b0353a747 Improve error messages when there is a space in between function name and parenthesis 2013-05-21 12:57:22 +02:00
José Valim d9b98a62c8 Check if the module is in the same context before checking if it is open 2013-05-19 19:42:13 +02:00
José Valim e18c1602ba Only add quoted: true to required ast nodes 2013-05-13 15:56:15 -06:00
José Valim f7cad1cffc Improve error messages 2013-03-27 09:54:00 -06:00
José Valim 28211b2714 Ensure aliases expansion also works for implicit aliases 2013-02-03 21:57:39 -07:00
José Valim 109c07e757 Improve aliases hygiene by using metadata 2013-02-03 15:12:38 -07:00
José Valim 3537bbbbf4 Refactor aliases handling 2013-02-03 13:07:20 -07:00
José Valim 7196543060 Improve how aliases for defmodule are generated 2013-01-30 16:43:29 -07:00
José Valim 9a62a43340 Aliases for defmodule also works for raw atoms 2013-01-21 18:40:10 -07:00
José Valim 4e651c8aae Expand aliases inside quote 2013-01-11 09:55:38 +01:00
José Valim 1508222d85 Properly expand aliases 2012-07-26 22:28:42 +02:00
José Valim 117d09509c Rename __MAIN__ to Elixir, closes #390 2012-07-22 12:49:36 +02:00
José Valim 7d1ef13f17 Rename Elixir.Builtin to Kernel, according to #390 2012-07-22 11:23:35 +02:00
José Valim 4b960a2114 Add compile meta task, move logic to compile.elixir 2012-07-18 10:20:28 +02:00
José Valim 1b4603160c Add elixir's parse transform to be used with erlang code 2012-07-12 11:29:46 +02:00
José Valim d5031b6347 Move all code to erlang style apps 2012-07-05 20:20:16 +02:00