Commit Graph
443 Commits
Author SHA1 Message Date
José Valim fc505f8a82 Replace ?is_new_atom macro by ?is_atom_start 2013-07-07 21:14:36 +02:00
José Valim 7ad7847596 Rearrange how ambiguous ops are handled, closes #1378 2013-07-06 12:32:22 +02:00
José Valim 35d019559d Remove the need for Inspect.Utils.return and Inspect.Algebra.text 2013-07-05 23:19:39 +02:00
José Valim b335b1663d Rename Binary.Inspect -> Inspect and Wadler -> Inspect.Algebra 2013-07-05 22:15:16 +02:00
José Valim a26d4cf0cd Merge remote-tracking branch 'brunoro/master' into jv-pretty-printing 2013-07-05 19:27:37 +02:00
José Valim a6f8e178c0 Consistently allow empty expressions on both side of operators 2013-07-04 20:29:39 +02:00
José Valim ebe522ec50 Tighten up the grammar rules regarding parentheses omission
Prior to this commit, Elixir allowed too many ambiguous calls
by ommitting the parentheses:

    do_something 1, is_list [], 3
    [1, is_atom :foo, 3]

Both cases above would lead to a compilation error, as an attempt
to call is_list/2 and is_atom/2 would happen. Those examples will
now raise a syntax error, pointing to the ambiguous location.

We have disallowed such examples throughout the language with
the exception of one argument calls:

    assert is_list []

Examples as above are extremely frequent and were kept as is.
2013-07-04 18:48:55 +02:00
José Valim f697ff4160 Ensure HashDict can be serialized into attribute, closes #1368 2013-07-04 11:35:14 +02:00
José Valim 4ae58d3bf4 Do not try to parse arguments for undefined functions 2013-07-04 11:16:14 +02:00
José Valim 15c1a9891c Implement bindings in Elixir 2013-07-04 10:18:46 +02:00
Gustavo Brunoro cb5bb2e548 Merge branch 'master' of https://github.com/elixir-lang/elixir 2013-07-03 18:54:33 -03:00
José Valim 6b82967dd6 Improve error report on unhandled -> 2013-07-03 21:29:35 +02:00
José Valim 62527cae9c Small clean up on parser file 2013-07-03 15:05:08 +02:00
José Valim 03323b9bfa Macro.escape should also escape nested tuples, closes #1344 2013-06-30 15:30:44 +02:00
José Valim 25f82dcb46 Go directly through :elixir_errors.warn 2013-06-30 10:42:57 +02:00
Gustavo Brunoro 45862f8472 Merge branch 'master' of https://github.com/elixir-lang/elixir
Conflicts:
	lib/elixir/lib/binary/inspect.ex
	lib/mix/lib/mix/tasks/local.install.ex
2013-06-29 02:54:16 -03:00
José Valim 447a57750f Simplify binding handling 2013-06-27 17:47:45 +02:00
José Valim 7ba5733496 No need to wrap lists in blocks 2013-06-26 21:53:33 +02:00
José Valim 7e11cea780 Ensure binding(..., false) also works 2013-06-24 16:24:08 +02:00
José Valim c6284557e7 Rename sigils from __ to sigil_$, closes #1301 2013-06-23 20:38:37 +02:00
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
Gustavo Brunoro 163485b5ba Merge remote-tracking branch 'upstream/master' into wadler-lindig
Conflicts:
	lib/elixir/lib/binary/inspect.ex
	lib/elixir/lib/kernel.ex
2013-06-16 16:20:15 -03: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