José Valim
709383f142
Warn on trailing commas on calls, closes #11399
2021-11-19 11:46:37 +01:00
José Valim
6d408bb0c0
Reject bidirectional formatting characters ( #11391 )
2021-11-15 21:10:51 +01:00
José Valim
ffd891a349
Support escaping of terminators in uppercase sigils heredocs for consistency, closes #11390
2021-11-15 14:21:28 +01:00
José Valim
8387dd70bc
Fix bootstrap
2021-11-10 19:37:34 +01:00
José Valim
0e59c68428
Do not crash on duplicate bindings, closes #11378
2021-11-10 19:27:59 +01:00
José Valim
913d401a7a
Perform implicit Application require as the compiler is aware of its constructs
2021-11-09 18:13:48 +01:00
Michał Łępicki
58e7c6a917
Settle elixir_errors:parse_error/6 InputString as charlist ( #11345 )
2021-10-25 23:09:32 +02:00
José Valim
f2ad9823d8
Only consider StartColumn on first line
2021-10-25 16:33:16 +02:00
felipe stival
edcb9096d5
Show code snippet on syntax and token missing errors ( #11332 )
...
Closes #11280 .
2021-10-25 16:18:29 +02:00
José Valim
5a4c03c02e
Handle more incomplete expressions in cursor_context_to_quoted
2021-10-24 17:22:01 +02:00
José Valim
9154c8b240
Include column in warnings emitted by compiler ( #11339 )
...
We also extend Mix.Tasks.Compiler.Diagnostic
to include {line, column} as possible position.
We also explicitly document the behaviour of
line=0, which is equivalent to unknown line.
Elixir was already setting the line to zero in
multiple occasions prior to this patch, so this
patch makes it official and we stop returning `nil`
for said cases.
2021-10-24 16:28:36 +02:00
José Valim
f3155007dd
Include column in more errors whenever possible
2021-10-24 15:58:19 +02:00
José Valim
7693b05016
Revert "Default to including columns by default"
...
This reverts commit 213cba2baa .
Including columns by default make Ecto test suite
consistently 10% slower and that's likely to replicate
across the board.
2021-10-23 10:28:02 +02:00
José Valim
213cba2baa
Default to including columns by default
...
This changes the default for Code.string_to_quoted/2
and friends, so it may break tests matching explicitly
on the output, but the functionality wise the AST should
still be the same. The reason why it is important to make
this change is to provide better error messages throughout
Elixir.
2021-10-22 21:21:19 +02:00
José Valim
23bb08885f
Add Code.Fragment.container_cursor_to_quoted/2 ( #11315 )
2021-10-16 15:12:09 +02:00
sabiwara
8203cf171a
Tokenizer uses static_atoms_encoder on quoted keyword keys ( #11313 )
...
Closes #11312
2021-10-15 08:10:18 +02:00
José Valim
2366705836
Improve docs and remove unnecessary field
2021-10-06 21:28:07 +02:00
José Valim
f2c4f9f9f9
Do not escape metadata in unquote with dynamic expression
2021-10-05 12:21:50 +02:00
Luiz Rodrigo de Souza
480d64042b
Add import Mod, only: :sigils ( #11284 )
2021-10-03 18:31:10 +02:00
Danila Poyarkov
c4b4bc3371
Allow sigil modifiers to contain digits ( #11283 )
2021-10-02 22:10:05 +02:00
José Valim
5f7a8cb542
Clarify mixing quotes in location: :keep
2021-09-28 15:04:35 +02:00
José Valim
98a8497fc0
No longer encode missing docs as empty maps in chunk
2021-09-21 15:22:55 +02:00
José Valim
4577c536ae
Annotate code to be removed on Erlang/OTP 24
2021-09-19 20:22:30 +02:00
José Valim
0a1bb932ef
Also mark 0 line annotations as generated
2021-09-18 13:08:25 +02:00
José Valim
af55ee5899
Add power operator ( #11241 )
2021-09-14 11:08:34 +02:00
José Valim
d6d8ad419f
Pass annotation forward when building Erlang AST
2021-09-11 10:21:31 +02:00
José Valim
8f96b9a114
Also handle nfd at the beginning of strings
2021-09-06 23:00:06 +02:00
Willian Frantz
f429a27e21
Fix nfd cluster columns ( #11231 )
2021-09-06 22:50:32 +02:00
José Valim
e16527e1c7
Deprecate env options in eval functions
2021-09-06 09:27:55 +02:00
Michał Łępicki
765a3bef6d
Pass annotation to arguments in more scenarios ( #11217 )
...
Follow-up to #11107
See also https://elixirforum.com/t/dialyzer-missing-message-in-otp-24/41977
2021-08-29 10:15:20 +02:00
José Valim
9fb7c9f9ea
Do not allow slashes in module names
...
Closes #11216 .
2021-08-29 10:13:22 +02:00
José Valim
bbde3cb98c
Handle OP/ARITY syntax more consistently
2021-08-27 21:39:14 +02:00
José Valim
6159b4e841
Warn if Application.compile_env is called without a require
2021-08-22 17:11:41 +02:00
José Valim
75595c322a
Add sigil and struct completion to code fragment ( #11197 )
2021-08-22 17:11:33 +02:00
José Valim
e4d8b3a31a
Raise on invalid use of compiler vars in match, closes #11189
2021-08-18 16:47:58 +02:00
José Valim
2e4f0fdbfa
Add mix xref trace that shows all deps for a given file ( #11184 )
2021-08-17 18:04:15 +02:00
José Valim
a3b12428f9
Let runtime pass check for unrequired macros
2021-08-08 21:19:02 +02:00
José Valim
3627e86110
Revert "Cache default environment on persistent term"
...
There is likely no benefit in such cache as all operations
are inherently fast.
This reverts commit fd97fec6c7 .
2021-08-03 21:32:25 +02:00
José Valim
fd97fec6c7
Cache default environment on persistent term
2021-08-03 21:15:10 +02:00
José Valim
739ad53fed
Break Macro.Env apart ( #11164 )
...
Previously, the internal Elixir expansion pass worked directly on
Macro.Env. However, this poised an issue, if we want to track
more information in the pass, we ended up exposing it on
Macro.Env, making it larger, and potentially slowing down
operations such as __ENV__ serialization.
This commit refactors the expansion pass to work with two
structures, the Macro.Env struct and a #elixir_ex{} record.
2021-08-03 13:35:15 +02:00
Michał Łępicki
6ba365df0c
Remove Mix.Env.vars from elixir_env.erl as well ( #11157 )
2021-07-29 16:06:15 +02:00
José Valim
106a99f134
Remove private and deprecated vars
2021-07-28 20:01:23 +02:00
José Valim
1ae07f7c0a
Add {:on_module, bytecode, :none} to compilation tracers
...
See #11145 .
2021-07-27 13:17:31 +02:00
José Valim
2eb9f1c047
Add Module.overridables_in/1, see #11145
2021-07-27 12:56:28 +02:00
José Valim
f32a4a3f22
Add reflection of records, see #11145
2021-07-27 11:58:14 +02:00
José Valim
11d5c33bb6
Bypass evaluator on fast compile
2021-07-27 07:55:42 +02:00
José Valim
8d5c07c1a4
Do not return context tuples on optimized eval
2021-07-22 08:10:07 +02:00
José Valim
cc99995f76
Add operator handling to Code.cursor_context
2021-07-21 18:59:43 +02:00
Dorgan
d1223e11fd
Preserve heredoc indentation metadata ( #11128 )
2021-07-20 08:16:21 +02:00
José Valim
605e3617e4
Do not crash when handling ambiguity errors, closes #11111
2021-07-13 10:36:29 +02:00