Commit Graph
421 Commits
Author SHA1 Message Date
José Valim 96a103d222 Allow :binding as an option in quote
This commit also adds Macro.expand_once/2 and Macro.expand_all/2.
2013-06-23 19:23:32 +02:00
José Valim 903aa60fec Finish operator table clean up 2013-06-23 13:18:25 +02:00
José Valim 969bc968ee Move ++, --, ** and // to new table 2013-06-23 13:18:25 +02:00
José Valim e941d78daf Move operator table clean up 2013-06-23 13:18:25 +02:00
José Valim 8d3475825b Group arrow-like ops together 2013-06-23 13:18:25 +02:00
José Valim 68c890e179 Move and and or operators to the new table 2013-06-23 13:18:25 +02:00
José Valim 6f73d7dbb9 Move comp_op to the new table 2013-06-23 13:18:25 +02:00
José Valim c2ac967123 Move all unary operators to new schema 2013-06-23 13:18:25 +02:00
José Valim dd573c9806 Initial work cleaning up op table 2013-06-23 13:18:25 +02:00
José Valim 2d8259b432 Support (x, y) when z, closes #1313 2013-06-22 18:53:18 +02:00
José Valim b2541a1b93 Inline list funcs so we don't pay an extra dispatch cost 2013-06-22 13:15:00 +02:00
José Valim 391fee3ea2 ^x variables should always refer to the value before the expression
Closes #1307
2013-06-21 18:27:16 +02:00
José Valim 5247961185 Optimize temp_vars lookup 2013-06-21 11:43:41 +02:00
José Valim c572cb80fc Support binding/2 that goes across all contexts 2013-06-19 14:17:45 +02:00
Andrzej Sliwa 8fa6c4f96f refactor/rename Macro.to_binary to Macro.to_string with deprecation warning 2013-06-18 23:35:13 +02:00
José Valim 4048e542d9 cp_r should pinpoint place of failure on errors 2013-06-18 19:52:06 +02:00
José Valim c4dac6fd7a Catch invalid arguments for binding/1 2013-06-18 16:29:12 +02:00
José Valim d3122ddcc5 Add binding/0 and binding/1 for retrieving bindings 2013-06-18 16:14:03 +02:00
José Valim 9904bdce9d Warn on undefined module attributes, closes #963 2013-06-18 12:19:15 +02:00
José Valim 754418493f Merge pull request #1275 from ericmj/elixir-in-warning
Emit warning for 'x in []' in guards
2013-06-18 03:04:05 -07:00
Eric Meadows-Jonsson 27000ea1b4 Emit warning for 'x in []' in guards 2013-06-18 11:57:27 +02:00
José Valim 620ee4298c Raise proper warnings when default clauses from different definitions collide, closes #1244 2013-06-18 11:36:57 +02:00
Yurii Rashkovskii 5e123e6519 Make sure we don't receive an EXIT message from the dependency tracker
It pollutes IEx and scripts execution

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2013-06-17 20:37:44 +02:00
José Valim 87da4e91bb Clean up error messages, move defaults warning to an error 2013-06-17 13:05:57 +02:00
José Valim 67896b56c5 Ensure errors point to the proper -> clauses
This commit changes the -> clauses representation from:

    { :->, meta, list({ list(expr), expr }) }

To:

    { :->, meta, list({ list(expr), meta, expr }) }

Now clauses can store metadata, which allows us to provide
accurate reporting information.

Closes #1215
2013-06-16 17:27:14 +02:00
José Valim 19ff7a03f9 Ensure imports inside quotes are properly registered, closes #1225 2013-06-16 13:18:47 +02:00
José Valim 7f5744bde7 Ensure defmodule :atom does not define an alias 2013-06-16 13:10:59 +02:00
José Valim b87797f788 Return Foo for __MODULE__.Foo outside of a module 2013-06-16 13:10:59 +02:00
José Valim 80e41f8b4b Allow +, -, and friends to be called dynamically
Our compiler still inline those calls. This commit simply
allows one to write:

    mod = Kernel
    mod.+(1, 2)
2013-06-15 10:45:12 +02:00
José Valim 1d8e39a2df Only change compilation status if warnings_as_errors 2013-06-15 09:46:10 +02:00
José Valim 21db352039 Always print warnings to stderr 2013-06-15 09:32:53 +02:00
José Valim 45f033d15a Add a test for warnings_as_errors option 2013-06-15 08:41:27 +02:00
José Valim 8eba2fcba0 Merge pull request #1214 from baldmountain/feature/898-warnings-as-errors
Feature/898 warnings as errors
2013-06-14 23:20:25 -07:00
José Valim bff8a6ae75 Remove deprecated code branches 2013-06-13 16:48:31 +02:00
Yuki Ito 961099746e Implicit super arguments is deprecated 2013-06-13 00:42:34 +09:00
Geoffrey Clements 76b2255d7b Don't pass warnings-as-errors to module since it isn't needed 2013-06-09 07:49:38 -04:00
Geoffrey Clements 93d5128db3 Implement José's suggestions.
1. Detect all places in elixir_errors:handle_file_warning/3 where we
output something with io
2. Change those places to go through an internal function that will
call elixir_compiler:get_opt and figure out if we should print to
stdout or stderr and act accordingly
3. In the same function above, whenever we print a warning as an error,
we should store somewhere that a warning as an error happened. I
recommend storing that in the elixir_code_server gen server
4. Provide a Code.compilation_status that would return it
2013-06-09 07:49:38 -04:00
Geoffrey Clements 6d98020923 Unwind a lot of the wrong direction, output warnings based on warnings-as-errors setting 2013-06-09 07:49:38 -04:00
Geoffrey Clements b0b444bbd3 a little closer, status is passed to main process 2013-06-09 07:49:37 -04:00
Geoffrey Clements 3e45188e88 Experiment with how to pass back status. process dictionary doesn't work. 2013-06-09 07:49:37 -04:00
Geoffrey Clements 51171cb8e1 Mostly done. Still need to fix warning printout. 2013-06-09 07:49:37 -04:00
José Valim 6ef10d4b0d Add tests for compile_string and compile_quoted, closes #1206 2013-06-07 14:48:19 +08:00
José Valim c765a95b91 Ensure default calls are connected in dispatch tracker 2013-06-07 13:34:41 +08:00
Alexei Sholik d55a1703bd Bring system.ex back to bootstrap. Closes #1155 2013-06-05 02:50:50 +03:00
José Valim a3aa1e8de5 Ensure noname scope does not leak after assignment 2013-06-03 00:24:14 +09: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 bcf9d814dd Remove deprecated code 2013-05-30 11:24:51 +09:00
José Valim 99cdb412e3 Give higher precedence to |> than =~ 2013-05-29 03:19:45 +02:00
José Valim 846048855f Error if guards are given but no implementation, closes #1125 2013-05-27 19:24:24 +02:00
José Valim 9a6259d333 Remove unused variable warning 2013-05-27 19:06:24 +02:00