Commit Graph
1564 Commits
Author SHA1 Message Date
José Valim df8bca004a Improve optional callback checks 2017-10-22 01:48:00 +02:00
José Valim aad66f22bc Move all remaining behaviour usage warnings to Elixir 2017-10-22 00:59:11 +02:00
Alexis Brodeur 18f723541c Perform some behaviour lint checks in Elixir (#6841) 2017-10-21 23:35:15 +02:00
José Valim f130cb9c84 Improve warnings during expansion 2017-10-21 20:43:35 +02:00
Glauber Campinho f3acc14fb5 Add file information to the dispatches on the source manifests (#6954) 2017-10-21 11:53:06 +02:00
José Valim 115bb08f51 Deprecate Range.range? in favor of pattern matching 2017-10-17 19:54:03 +02:00
Andrea Leopardi b5211deec0 Fix a bug where we discarded some meta in some literals in the parser (#6946)
Closes #6945.
2017-10-17 17:31:48 +02:00
José Valim 01cd27393e Keep integer/float underscores in the formatter, closes #6931 2017-10-16 16:44:53 +02:00
José Valim d475c8c286 Do not pass :in_memory to load_binary
Erlang's typespecs define only cover_compiled and preloaded
as valid atoms and uses an empty list for generated code.
So we should follow Erlang's rules until we can officially
relax them.
2017-10-14 23:19:32 +02:00
José Valim 782a4a59c3 Formatter should not fail on empty clauses, closes #6924 2017-10-12 11:30:41 +02:00
José Valim a33cbcd32a Format errors_test.exs 2017-10-12 09:35:58 +02:00
José Valim 566db02f73 Preserve escaped new lines in formatter, closes #6861 2017-10-11 13:18:49 +02:00
José Valim 06bda15736 Do not add parens for var.field before do/end blocks 2017-10-10 16:13:10 +02:00
José Valim bf3fa2646a Do not apply next_break_fits if eol is present 2017-10-09 23:55:49 +02:00
José Valim 88b6e54671 Properly render :-> as an atom 2017-10-09 22:55:07 +02:00
José Valim 21e44bdb09 Keep the user's choice on non-module remote calls with no args 2017-10-09 22:43:08 +02:00
José Valim 541f56d950 When when and | also respect new lines 2017-10-09 17:13:39 +02:00
José Valim 8e5d31d875 Only keep locals_without_parens if they never had parens to start with 2017-10-09 15:57:57 +02:00
José Valim 4a5be87fca Store specs/callbacks in the order they are defined 2017-10-09 11:08:52 +02:00
José Valim 5bd91a4cb3 Warn on trailing commas in calls 2017-10-09 10:43:10 +02:00
José Valim 3335c73847 Also preserve user newlines if trailing commas exist 2017-10-09 09:17:35 +02:00
José Valim e61c6e00c8 More improvements to the formatter grammar, docs, and locals without bindings 2017-10-08 19:28:36 +02:00
José Valim f311882ed8 Check formatting is equivalent on travis 2017-10-08 19:28:36 +02:00
José Valim 74d0efe313 Do not raise on clauses with newlines before and after -> 2017-10-07 10:13:53 +02:00
José Valim d5f3ec2e96 Add end_lines to do/end blocks and represent empty ones with empty blocks 2017-10-07 09:50:17 +02:00
José Valim 75fc03ace7 Add more metadata to containers 2017-10-07 00:18:22 +02:00
José Valim 3b411a622e Return empty block for empty parens instead of nil 2017-10-06 19:34:25 +02:00
José Valim aeea9eef36 Do not match on empty block meta 2017-10-06 15:19:37 +02:00
José Valim 743ae13f7b Add endline for functions and blocks 2017-10-06 15:01:23 +02:00
José Valim 25e6e268b6 Add end_line to interpolation 2017-10-05 19:00:37 +02:00
José Valim c1bd106613 Rely on side effects for preserving comments
The previous implementation would not lead to parsing
errors in interpolations since code inside interpolation
is parsed immediately.
2017-10-05 13:27:25 +02:00
José Valim e0884748f7 Deprecate Keyword.replace/3 and Map.replace/3
`replace!` was introduced to mirror `update!` but without the
anonymous function. Given there is no `update`, we should not
introduce a `replace` until we are sure of the semantics we
want for update.
2017-10-04 13:43:07 +02:00
Peter Caisse e2f8715ca5 Improve the wording in alias error messages (#6623) 2017-10-01 21:16:50 +02:00
José Valim 7880536a13 Remove entry points for rebar 2 2017-09-29 16:11:37 +02:00
José Valim d3ac3221ae Move & up in the operator table to avoid conflicts with | in cons, closes #6613 2017-09-28 18:32:52 +02:00
Artur Cygan c18693e4fa Improve error message on oversized atom (#6612) 2017-09-28 14:04:29 +02:00
Allen Madsen b2ed46ec5a Show link to guards docs when an invalid guard expression is used (#6594) 2017-09-25 09:41:33 +02:00
José Valim 606f6f0e30 Add string_to_tokens and tokens_to_quoted 2017-09-24 23:15:19 +02:00
Jake Becker d2f1cccace Add option :return_errors to ParallelCompiler (#6446) 2017-09-21 08:14:52 +02:00
José Valim 88017b2916 Prefix variables with V when emitting Erlang code
This guarantees decompiling Elixir code to Erlang results
in runnable code and improves Elixir's interoperability
with tools such as the Erlang debugger.
2017-09-15 12:03:39 +02:00
José Valim 1a0ee18fcc Do not prematurely raise on end tokens, closes #6567 2017-09-12 21:58:46 +02:00
José Valim fb77ef53aa Only add eol marker with both begin-end in containers have eol 2017-09-12 14:42:15 +02:00
José Valim bbae5c73ed Document all atoms exposed through __info__ 2017-09-12 13:33:47 +02:00
José Valim d73d453f6f Fix overridable tests 2017-09-09 12:18:00 -07:00
José Valim ecb0f611e8 Do not traverse clauses table to retrieve defaults
Closes #6553
2017-09-09 11:50:57 -07:00
Kelvin Stinghen d621875fef Warning on the use of length(x) == 0 on guards (#6538) 2017-09-06 22:38:44 +02:00
Kelvin Stinghen de06cfd6fb Improve the error message for rescue, catch and else inside def (#6542) 2017-09-06 20:42:38 +02:00
Tomasz Marek Sulima eda5387a81 Warn if catch comes before rescue in try (#6537) 2017-09-04 11:39:00 +02:00
José Valim 35e96b82cb Use __info__ and module_info where appropriate 2017-09-02 23:35:23 +02:00
Ivan Kozik 53acbc7ac2 Fix more typos and spelling errors (#6530) 2017-09-01 10:20:53 +02:00