Commit Graph
302 Commits
Author SHA1 Message Date
Jonatan Männchen e1d171e5c7 Add inline License / Copyright to Erlang files (#14255) 2025-02-05 13:50:00 +01:00
Jonatan Kłosko 3ee2ecabff Remove duplicated metadata in nested call AST (#14122) 2024-12-27 11:36:52 +01:00
Jonatan Kłosko 8e1d0411ba Add token metadata to distinguish between :nil and nil (#13999) 2024-11-18 09:32:15 +01:00
Jonatan Kłosko 3b01b2a632 Add separate metadata entry for every block parens (#13996) 2024-11-15 13:55:22 +01:00
Jonatan Kłosko 5b221a5545 Add AST metadata about assoc operator location (#13978) 2024-11-07 10:14:38 +01:00
Jonatan Kłosko 7d421b197c Add parens meta to stab operator and empty block (#13973) 2024-11-06 13:55:04 +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
Jonatan Kłosko ee90126527 Add delimiter meta to demote calls with quoted identifier (#13963) 2024-11-05 13:14:20 +01:00
Jonatan Kłosko bd7d428ca0 Add metadata about single-expression block closing/opening (#13940) 2024-11-03 10:20:44 +01:00
José Valim d9cf285d71 Enforce parens when formatting on more operators (#13711)
* On bitwise operators

* On right precedence operators which are semantically
  non-associative (such as -- and potentially ---)
2024-07-08 18:23:14 +02:00
José Valim f1f54df22a Document tuples inside containers, closes #13681 2024-06-22 13:39:52 +02:00
José Valim ba579f1410 Use simpler solution for adjusting map line 2024-05-23 19:44:22 +02:00
José Valim 80af632a7e Wrap (a -> b) into literals instead of plain lists, closes #13358 2024-02-24 22:48:05 +01:00
José Valim 514615d034 Apply end of expression more consistently, closes #13355 2024-02-18 11:25:19 +01:00
José Valim 6655d40376 Streamline and document the parser 2024-02-07 15:06:48 +01:00
José Valim d68c8d6cdd Unify handling of .. and ... 2024-02-07 12:26:39 +01:00
José Valim d244eaf8be Remove end_of_expression from ->, closes #13318 2024-02-06 13:46:46 +01:00
José Valim fd4e6b530c Fix column marker for maps 2024-02-05 15:13:31 +01:00
Mitchell Hanberg eb1499ac29 Include from_brackets metadata in all cases (#13317) 2024-02-05 09:40:16 +01:00
José Valim 1b6fb26dfb Let's not deprecate ...foo as the API may be useful
for the type system in the future.

This reverts commit f97d8585e8.
2023-11-10 12:36:04 +01:00
José Valim 5225b33bab Add interpolation token metadata 2023-09-17 22:46:26 +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
José Valim 50266c48e4 Fix regression on grammar, closes #12579 2023-05-22 16:15:04 +02:00
Andrea Leopardi c402e8336c Add support for multi-letter uppercase sigils (#12448) 2023-03-05 13:10:28 -06:00
José Valim 9e846dd0a4 Remove outdated TODO 2023-02-21 16:30:22 +01:00
JP Ramassini aa8e6d3feb Add error message when piping into an expression ending in bracket-based access (#12359)
Closes #12351.
2023-01-23 21:43:42 +01:00
José Valim d86916cae8 Improve error message for {foo: :bar} and <<foo: :bar>> 2023-01-19 00:09:40 +01:00
José Valim 7b73407af8 Respect line breaks after =
Many editors use indentation for collapsing
so folks may want to use `var =` followed by
new line to collapse. This PR makes it possible
and aligns `=` with other operators.
2023-01-04 12:06:58 +01:00
José Valim 3186819506 Apply rearrange ops only inside parens, closes #12296 2022-12-10 19:27:26 +01:00
sabiwara 7ebfcc7de9 Fix formatter error on nested do without parenthesis (#12274) 2022-11-27 15:15:18 +01:00
José Valim ef5916bb67 Refactor and normalize format 2022-10-27 23:29:09 +02:00
José Valim 8f57c0ed1b Update notes on | 2022-10-25 10:36:40 +02:00
José Valim 0a1a5991d9 Remove unecessary parens in nullary type funs 2022-10-14 13:55:23 +02:00
José Valim 9fb3cf6030 Fix ambiguity in &INT with brackets 2022-10-08 10:52:37 +02:00
José Valim 9aca91ce06 Improve error message for too many arguments in access 2022-09-27 17:51:23 +02:00
José Valim 29ed6925b3 Warn for nested calls without parens inside keywords 2022-09-24 16:50:07 +02:00
José Valim 3ee1e83eef Remove parser ambiguity within stepped ranges 2022-09-10 00:32:13 +02:00
José Valim f97d8585e8 Deprecate ... as a valid function call identifier 2022-08-15 15:10:54 +02:00
José Valim df64d5c6a1 Change import metadata to imports as a list
This is preparation to better ambiguity solving
of quoted expressions.
2022-05-08 17:00:09 +02:00
José Valim d93577ecfa Clarify what the correct xor precedence should have been 2022-04-16 13:50:35 +02:00
José Valim b52f274406 Add .. as a nullary operator that returns 0..-1//1 (#11623) 2022-02-13 15:18:53 +01:00
Michał Łępicki 9e898f8b5a Remove references to HiPE (#11543)
* Fix typo in Dialyzer CI step name

* Remove references to HiPE
2022-01-05 13:37:17 +01:00
José Valim 8c2ec72875 Do not emit warnings on Cursor.Fragment.container_cursor_to_quoted/2 2021-12-16 16:13:39 +01:00
José Valim acbc04a902 Warn on trailing commas on calls, closes #11399 2021-11-19 11:46:46 +01:00
José Valim 65ab34224f 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 f2bd03273f Include column in more errors whenever possible 2021-10-24 15:58:19 +02:00
José Valim e480151fe7 Add Code.Fragment.container_cursor_to_quoted/2 (#11315) 2021-10-16 15:12:09 +02:00
José Valim 7a9a00d9e2 Add power operator (#11241) 2021-09-14 11:08:34 +02:00
José Valim 1789c1eb9b Handle OP/ARITY syntax more consistently 2021-08-27 21:39:14 +02:00
Dorgan 1c8ba7489d Preserve heredoc indentation metadata (#11128) 2021-07-20 08:16:21 +02:00