Commit Graph
233 Commits
Author SHA1 Message Date
Daniel Kukula 6cde8680ab Remove intermediate list in elixir_interpolation hex_to_int (#15767) 2026-08-18 17:36:38 +02:00
Jean Klingler 8efdf4eb10 Add List.to_existing_atom/2 to validate against a list of allowed atoms (#15493) 2026-06-16 20:35:01 +09:00
Jean Klingler fd1109e859 Add String.to_existing_atom/2 to validate against a list of allowed atoms (#15483) 2026-06-16 17:45:09 +09:00
Jean Klingler 571c108503 Inline in empty list in erlang pass (#15413) 2026-05-24 09:05:42 +09:00
José Valim e5d8b00e5b Remove maps:put/3 inlining, as it is done by the Erlang compiler, closes #15313 2026-04-27 12:03:24 +02:00
José Valim 7945446cb4 Allow preserving sigil metadata in container cursor to quoted
Closes #14243.
2026-03-13 20:03:34 +01:00
José Valim 19c628ae23 Mark invididual guards of ||, &&, if, and unless as generated 2025-12-30 12:00:11 +01:00
Jean Klingler aef3dcecd1 Warn on deprecated ~~~ unary op in tokenizer (#14870) 2025-10-29 19:23:31 +09:00
Jonatan Männchen e1d171e5c7 Add inline License / Copyright to Erlang files (#14255) 2025-02-05 13:50:00 +01:00
sobolevn 1ab6cdc2db Deprecate single quotes in quoted atoms and calls (#14047)
Closes #13958.
2024-12-10 19:31:11 +01:00
Jonatan Kłosko d0f7c03744 Fix delimiter metadata for single quote atoms and remote calls (#13966) 2024-11-05 17:11:39 +01:00
José Valim d7ea2fa2e4 Handle cursor completion inside fn/rescue/catch/else/after 2024-05-14 17:04:57 +02:00
Jean Klingler dc6fa24edd Inline duration building in shift/2 functions (#13489)
* Inline duration building in shift/2 functions

* Rename __duration__! and define in all modules
2024-04-10 12:57:26 +09:00
Jean Klingler 98719ff200 Inline some pure functions calls (#13483) 2024-04-08 22:54:03 +09:00
José Valim d68c8d6cdd Unify handling of .. and ... 2024-02-07 12:26:39 +01:00
José Valim bc8463f5b2 Remove more test suite warnings 2023-10-31 08:05:40 +01:00
José Valim 14f3a1e372 Deprecate single quotes as charlists 2023-10-29 13:30:03 +01:00
Jean Klingler 6ee16616c0 Fix OTP 26.1 warning in tests (#12954) 2023-09-23 18:15:09 +09:00
Jean Klingler 9c0fa3cfef Warn when matching on 0.0 and generate erl AST for +/-0.0 (#12949) 2023-09-23 00:27:44 +09:00
Vinícius Müller 0349240827 Add MistmatchedDelimiterError (#12918) 2023-09-12 12:18:51 +02:00
Jean Klingler a7edd6ea47 Parser honors :static_atoms_encoder for multi-letter sigils (#12706)
* Unify sigil token generation

* Parser honors :static_atoms_encoder for multi-letter sigils

* Remove chars from token, reverse engineer from atom
2023-06-24 18:29:24 +09:00
Zach Allaun 2d65a4613b Fix column count when tokenizing escaped interpolations (#12504) 2023-03-30 22:24:23 +02:00
Andrea Leopardi c402e8336c Add support for multi-letter uppercase sigils (#12448) 2023-03-05 13:10:28 -06:00
sabiwara 2c03d5fd90 Follow-up for Erlang maybe (#12430) 2023-02-27 12:36:20 +01:00
José Valim b8c7bfa1bf Add prune_binding to Code.eval_quoted_with_env/4 2022-10-29 20:42:51 +02:00
José Valim bee0bb56be Do not emit warnings when formatting code
Closes #11595.
2022-01-26 13:37:53 +01:00
José Valim 851ac27272 Run unicode security linting on more tokens 2022-01-21 10:50:02 +01:00
José Valim e480151fe7 Add Code.Fragment.container_cursor_to_quoted/2 (#11315) 2021-10-16 15:12:09 +02:00
sabiwara 0a26aa543b Tokenizer uses static_atoms_encoder on quoted keyword keys (#11313)
Closes #11312
2021-10-15 08:10:18 +02:00
Danila Poyarkov 51ddee7b85 Allow sigil modifiers to contain digits (#11283) 2021-10-02 22:10:05 +02:00
José Valim 2a3dfa7d7e Pass annotation forward when building Erlang AST 2021-09-11 10:21:31 +02:00
José Valim 1789c1eb9b Handle OP/ARITY syntax more consistently 2021-08-27 21:39:14 +02:00
José Valim 5eb2efe543 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
José Valim 46bd3d57d9 Add operator handling to Code.cursor_context 2021-07-21 18:59:43 +02:00
Dorgan 1c8ba7489d Preserve heredoc indentation metadata (#11128) 2021-07-20 08:16:21 +02:00
José Valim 35a066dd0b Fix warning on Erlang suite 2021-06-08 08:56:10 +02:00
José Valim b44bbe536c Do not assume that literals in blocks have been normalized 2021-05-27 13:15:46 +02:00
José Valim 2a374aee71 No longer auto-sort bindings 2021-02-24 15:39:33 +01:00
José Valim 85599242fd Update erlang test helper 2021-02-24 09:50:48 +01:00
José Valim 93adad7aa4 Remove duplicated tests 2021-02-24 09:40:56 +01:00
José Valim 1656bb2b04 Properly handle keywords followed by ::, closes #10599 2021-01-02 17:41:16 +01:00
sabiwara cc8c657fbe Fix &//2 parsing issue (#10312) 2020-09-10 09:20:07 +02:00
Ivan Rublev 0ae5f4fda5 Add +++ and --- with right associativity to the list of custom operators (#9954) 2020-04-21 13:03:31 +02:00
Wojtek Mach c3752ac4df Add :indentation to sigil heredoc meta (#9725) 2020-01-14 20:45:24 +01:00
Wojtek Mach 63be6419ee Add :column to Code.string_to_quoted*/2 2020-01-12 15:41:36 +01:00
José Valim dbf8a7a9fe Use version metadata in Erlang pass 2019-11-16 02:45:55 +01:00
José Valim 08d6fe8cb8 Add parens to static remote nullary calls
test/erlang/module_test.erl have also been removed
as they have been ported elsewhere.
2019-11-08 17:59:08 +01:00
José Valim ab71fef4a9 Reduce private API surface 2019-07-29 15:20:13 +02:00
José Valim 8c5c466a71 Add literal encoder option to Code.string_to_quoted 2019-06-19 00:04:08 +02:00
José Valim d9af62f7e5 Ensure third element in location tuple is either nil or an integer 2019-05-09 10:59:13 +02:00