Commit Graph
5933 Commits
Author SHA1 Message Date
shribe 6033ccdadd Add File.read_link/1 and File.read_link!/1 (#5739) 2017-02-16 12:01:59 +01:00
José Valim 482041e7ff Move tokenizer macros to tokenizer 2017-02-15 23:05:02 +01:00
José Valim ad7642b7d6 Perform map_key check on elixir_exp 2017-02-15 20:44:06 +01:00
Andrea Leopardi f50a7693f4 Remove some rescue-related errors from elixir_translator (#5776)
I also added tests for such errors in Kernel.ExpansionTest.
2017-02-15 19:40:44 +01:00
Andrea Leopardi 3094471dc5 Move "unbound variable ^foo" to elixir_exp (#5774) 2017-02-15 17:34:03 +01:00
José Valim f335097f92 Avoid expanding macros twice and improve messages 2017-02-15 17:32:09 +01:00
José Valim 4728c562db Move &1 check to expansion pass 2017-02-15 17:07:07 +01:00
Kelvin Stinghen 386698aac3 Improving the function header def args compilation error (#5765)
The code:

    def f (x), do: x

was printing the function header definition error because it is parsed
to this:

    def f((x), do: x)

So we made an additional description to the compilation error.

This commit fixes #5761
2017-02-15 17:06:53 +01:00
Gary Rennie d5e7ca80f2 Fix arguments in operators section of syntax reference (#5775) 2017-02-15 16:47:01 +01:00
Andrea Leopardi 33d72e29e1 Remove an unused import from elixir_translator 2017-02-15 13:19:48 +01:00
Andrea Leopardi 5138a4453f Check for "unbound variable _" in elixir_exp (#5773)
I also had to adjust the check for "_ -> ..." clauses in "cond" because right
now, it performs such check after expanding the clauses, but with the change in
this commit then the "unbound variable _" error would fire first. With this
commit, we check for "_ -> ..." clauses before expanding the clauses, which may
not be ideal since the clauses could expand to "_ -> ..." but it's a compromise
we're willing to make (after all, this error is just a friendlier error than
"unbound variable _", not a necessary one).
2017-02-15 12:00:23 +01:00
Andrea Leopardi 9eff4ba103 Drop support for "rescue exception in _" (#5771)
We never officially supported this, but "accidentally" supported it because of
how we implemented "rescue exception" (without "in"). With this commit, we move
this step from expansion to elixir_try.
2017-02-14 20:25:23 +01:00
José Valim 53a5ab9c0b Add syntax reference documentation 2017-02-14 20:20:18 +01:00
José Valim bb091b0b9a Move CompileAssertionFail to errors_test exclusively 2017-02-14 16:49:46 +01:00
José Valim a06561b8b5 Move expansion related tests to expansions_test 2017-02-14 15:41:08 +01:00
José Valim 11537b4c11 Remove unused elixir_scope fields 2017-02-14 14:38:35 +01:00
José Valim ddffa75cfe Move maps/structs validation to elixir pass 2017-02-14 14:34:22 +01:00
Andrea Leopardi 9dc579672e Move compile error for _ in cond to elixir_exp (#5767) 2017-02-14 11:32:07 +01:00
Eksperimental 97cef4d828 Stop aliasing :filename to FN in the Path module (#5769)
In the same vein as
https://github.com/elixir-lang/elixir/pull/5768
2017-02-14 01:01:08 +01:00
Andrea Leopardi 57211ef25a Move local-calls compile errors from elixir_translator to elixir_exp (#5764) 2017-02-14 00:22:53 +01:00
Andrea Leopardi fdefb551b1 Stop aliasing :file to F in the File module (#5768)
This improves readability while still keeping the code short and concise.
2017-02-13 23:47:09 +01:00
José Valim 636c49fb5c Add grapheme tests 2017-02-13 15:44:59 +01:00
José Valim 3e394e8ef0 Incorporate new grapheme rules in Unicode 9 2017-02-13 14:34:04 +01:00
Andrew Dryga 74170a634b Fixed typo in Registry.start_link arity (#5759) 2017-02-11 19:38:37 +00:00
Liam dca3df0c03 Add hard links (#5755)
* Adds hard link support

* Add tests for links
2017-02-11 18:02:57 +00:00
José Valim d27b4c6479 Remove duplication in format_errors 2017-02-10 20:55:53 +01:00
Julius Beckmann 7fe993a857 Added example to Enum.into/3 (#5756)
Making clear how Enum.into/3 can be used with maps.
2017-02-10 14:26:43 +01:00
José Valim 5a4dad2935 Use GenServer as behaviour example 2017-02-09 20:40:42 +01:00
Charlotte '); DROP TABLE users;-- ac9637d0fb Comment that the in/2 operator on ranges succeeds only on integers (#5750) 2017-02-08 19:33:30 +01:00
José Valim 23e3d822c6 Expand attributes on bootstrap only when Macro module is available 2017-02-08 18:16:06 +01:00
José Valim 7c76d53afc Remove deprecated GenEvent tests 2017-02-08 17:11:10 +01:00
José Valim 9c0d6a66d5 Assert valid match and guard constructs on Elixir pass 2017-02-08 15:58:34 +01:00
José Valim a50630ea29 Remove translation from elixir_fn 2017-02-08 14:59:11 +01:00
José Valim 88f7dc140e Remove super attribute from elixir_scope 2017-02-08 14:42:08 +01:00
Juraj Hlista 20c461e784 Improve docs for Application (#5724) 2017-02-01 20:22:51 +01:00
eksperimental 0d1fc8b425 Remove unused arg allow_nonexistent_atoms? in OptionParser.do_next and rename function
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2017-02-01 16:18:41 +01:00
José Valim 7d38b11449 Avoid bootstrap warnings on macro, closes #5725 2017-02-01 15:16:34 +01:00
Pedro Assumpcao c832861de3 Fix an example in the docs for Map.put_new/3 (#5723) 2017-01-31 18:02:43 +01:00
José Valim 18e73365df Improve docs for OptionParser 2017-01-31 11:05:44 +01:00
Gal Tsubery 1341bdff9e Fix redefined function source location (#5720)
When functions are redefined in a different file, the translation uses
the first definition source location for all subsequent definitions.
This manifests itself as warnings that are ascribed to the wrong file.

Fixes #5719
2017-01-31 11:05:27 +01:00
Aleksei Magusev 170434113e Minor documentation improvements to Calendar, and Regex 2017-01-29 19:43:57 +01:00
Andrew Dryga 8a8e3672e4 Introduce :trim_bom option for File.stream!/2 (#5702) 2017-01-29 19:13:30 +01:00
José Valim 808b6cf635 Improve docs about comparisons, closes #5716 2017-01-29 19:12:27 +01:00
Andrew Dryga b116f0dd19 Fix code style in tests for OptionParser (#5714) 2017-01-29 00:51:50 +01:00
Andrew Dryga 403368d2be Implement allow_inexistent_atoms for OptionParser (#5709) 2017-01-28 22:40:09 +01:00
sschneider1207 81deb09a08 Add Application.start_phase/3 callback and associated docs (#5694) 2017-01-28 14:29:15 +01:00
Andrew Summers 240520ce5a Made ansicode and ansilist public types. (#5706)
The public type for ansidata references ansilist and ansicode, so
dialyzer complains about missing type for them when referencing
ansidata.
2017-01-27 12:50:55 +00:00
Andrea Leopardi b6e1beb9b3 Hard deprecate GenEvent and provide alternatives in its docs (#5705) 2017-01-26 23:56:41 +01:00
Aleksei Magusev b1379e06e5 Correct datetime types spelling in Calendar 2017-01-26 13:28:26 +01:00
Marcus Gartner 37cb48adab Fix Kernel.binary_part/3 spec (#5703) 2017-01-26 11:16:57 +01:00