Commit Graph
421 Commits
Author SHA1 Message Date
José Valim 9e56691274 Ensure aliases from macros are properly expanded, closes #1123 2013-05-27 11:08:23 +02:00
José Valim d19f6beca0 Provide source information to all dispatches and complement the API 2013-05-26 20:20:23 +02:00
José Valim da84a797b0 Module.DispatchTracker also records remotes 2013-05-26 20:20:23 +02:00
José Valim fefad03595 Ensure warnings are proper with yanked and reattached overridables 2013-05-26 17:51:42 +02:00
José Valim f76aeba141 Check for imports conflicts in batches 2013-05-26 14:49:58 +02:00
José Valim fbb06f2086 Record each definition on tracker as soon as defined 2013-05-26 14:39:02 +02:00
José Valim ffc91e3004 Rename Kernel.LocalsTracker to Module.DispatchTracker 2013-05-26 14:39:02 +02:00
José Valim c3e7543e48 Extract imports handling to locals tracker (soon to be renamed) 2013-05-26 14:39:02 +02:00
José Valim c7e86b0554 Start refactoring LocalsTracker to support more vertices 2013-05-26 14:39:02 +02:00
José Valim c3dd4006b0 Reduce atom footprint when compiling an elixir module 2013-05-25 16:37:33 +02:00
José Valim e05448afd7 Remove *_table terminolgy in favor of setup/cleanup 2013-05-25 16:02:19 +02:00
José Valim d757f31ccd Unused functions with cyclic dependencies are now also warned as unused
Closes #1105
2013-05-25 00:14:37 +02:00
José Valim d4609c6f4e Get rid of elixir_glob now that we run on > R16 2013-05-24 18:01:52 +02:00
José Valim f29c6afe3d Reduce the number of files required for bootstrap 2013-05-24 16:39:42 +02:00
José Valim 86e7069a0a Clean up how we store recorded locals in the imports table 2013-05-24 12:57:28 +02:00
José Valim 0dcd5501f0 Fix a bug where unquote_splicing did not work on the left side of a stab op 2013-05-23 23:50:16 +02:00
Yuki Ito 231d65e879 Fix checking unused local functions and default arguments 2013-05-24 00:34:56 +09: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 65e67cdc27 Ensure we emit a warning for recursive non used calls 2013-05-22 19:41:03 +02:00
Alexei Sholik c634a5d232 Add :elixir.scope_for_eval/2 convenience function 2013-05-22 15:57:36 +03:00
José Valim 26640e3940 Start v0.9.0.dev work 2013-05-22 14:56:26 +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 8907edca3e Improve error message for invalid patterns in guards and matches
Closes #1092
2013-05-19 21:39:44 +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 05b650f373 Change preference of |> to support constructs like 1..5 |> Enum.to_list 2013-05-19 18:33:14 +02:00
José Valim 021dc541b8 Remove unsupported matching on rescue clause 2013-05-19 15:54:33 +02:00
Yuki Ito 020c5b0dd2 Fix warning for unused default arguments 2013-05-16 13:58:29 +09:00
José Valim 95377a36a5 Expand macros and quoted variables inside << >>, closes #1063 2013-05-14 22:33:16 -06:00
José Valim 46fc45df9b Revert "Expand macros and quoted variables inside << >>, closes #1063"
It broke the build. Reopens #1063.

This reverts commit 93f71c8624.
2013-05-14 22:04:14 -06:00
José Valim 93f71c8624 Expand macros and quoted variables inside << >>, closes #1063 2013-05-14 21:50:45 -06:00
José Valim 79dde1e97e Accept macro/@attribute options on quote 2013-05-13 22:14:34 -06:00
José Valim 23cbf3e853 Support options from macros and @attributes in import, alias and require 2013-05-13 21:51:07 -06:00
José Valim baf5fcf096 Ensure nested modules are properly defined, closes #1057 2013-05-13 16:24:29 -06:00
José Valim e18c1602ba Only add quoted: true to required ast nodes 2013-05-13 15:56:15 -06:00
José Valim 32ae6d3424 Ensure imports respect the quote context 2013-05-13 15:56:15 -06:00
José Valim 02d0aa1d9a Deprecate var_context in favor of context 2013-05-13 15:56:15 -06:00
José Valim 5ce473152f Provide a more robust alias and import expansion
Now that we support { quoted, true }, we can know
before hand if an alias or import comes from a macro
and act accordingly.
2013-05-13 15:56:15 -06:00
José Valim f38cf28cbd Store in the AST if contents come from a quoted expression
This provides a more robust way of checking from where
the original expressions are coming from compared to the
lexical check_clauses field we had in elixir_scope.

A direct consequence of this commit is that, the following
code:

    defrecord Sample, [:hello] do
      import List
    end

Now raises a warning if the List import is not used,
where it didn't previously.
2013-05-13 15:56:15 -06:00
José Valim 9118b36069 Improve warnings related to default arguments
* "default arguments in some_fun/3 are never used"
* "the first default argument in some_fun/3 is never used"
* "the first 2 default arguments in some_fun/3 are never used"

Closes #929
2013-05-12 19:31:34 -06:00
José Valim b90b8d1385 Improve cons cell and other operators precedence, closes #862 2013-05-12 14:24:35 -06:00
José Valim 930be9d99f Improve function(some_macro/x) error message 2013-05-12 11:34:43 -06:00
José Valim 7b41ff3c01 Merge pull request #1026 from elixir-lang/jv-no-warn-unused-imports
Warn on unused imports
2013-05-09 16:55:16 -07:00
José Valim 0e8bac7e9e IO.gets and IO.getb now return binaries when reading from stdio 2013-05-08 15:13:06 -06:00
José Valim 7bae0029f2 Automatically detect when to warn on import 2013-05-06 20:22:18 -06:00
José Valim 65f7d56a8e Don't warn on unused imports 2013-05-06 20:17:31 -06:00
José Valim c6222a05da Refactor elixir_import to mention special forms list 2013-05-06 19:18:43 -06:00
José Valim a93264be81 Private on_load functions should not trigger unused warning 2013-05-06 11:31:05 -06:00
José Valim cbe82e0912 Add __DIR__, closes #1019 2013-05-06 11:03:37 -06:00
José Valim ddb87a96ca Private functions used by private macros no longer emit an unused warning, closes #885 2013-05-05 21:59:40 -06:00
José Valim c53314dfc4 Ensure lexical scopes are not password forward by accident 2013-05-05 20:28:59 -06:00