José Valim
d7ea2fa2e4
Handle cursor completion inside fn/rescue/catch/else/after
2024-05-14 17:04:57 +02:00
José Valim
b8f069d08e
Fix parsing of ambiguous operators followed by containers
...
Closes #13402 .
2024-03-09 11:17:06 +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
926560350b
Extract snippet in elixir_errors to simplify exception handling
2023-12-21 21:14:44 +01:00
José Valim
7f3d62108b
Consider column in snippets, closes #13199
2023-12-21 19:26:06 +01:00
José Valim
4d712b25ea
Normalize token missing and mismatched delimiter exceptions
...
Closes #13183 .
Closes #13185 .
Closes #13186 .
Closes #13187 .
2023-12-14 17:02:15 +01:00
Vinícius Müller
02b0876154
Improve diagnostics for unclosed heredocs ( #13182 )
2023-12-14 09:24:43 +01:00
Vinícius Müller
1d978bf73c
Improve unclosed delimiter messages ( #13123 )
2023-12-04 12:46:15 +01:00
José Valim
c4fa754dde
Add :emit_warnings to Code.string_to_quoted
2023-11-06 16:30:46 +01:00
José Valim
8ae45c1c6b
Fix case clause error on tokenizer
2023-11-06 13:28:53 +01:00
José Valim
14f3a1e372
Deprecate single quotes as charlists
2023-10-29 13:30:03 +01:00
Vinícius Müller
9a74a73a00
Normalize hint labels ( #12958 )
2023-09-23 18:59:08 +02:00
Vinícius Müller
3111a5b78a
Improve mismatched delimiter message ( #12928 )
2023-09-15 18:31:48 +02:00
José Valim
646577af50
Add opening_delimiter to token missing error
2023-09-15 18:18:09 +02:00
José Valim
9a3d1a0321
Include open_delimiter in TokenMissingError
2023-09-15 18:18:09 +02:00
Vinícius Müller
0349240827
Add MistmatchedDelimiterError ( #12918 )
2023-09-12 12:18:51 +02:00
Vinícius Müller
0d139c15df
Save column information on start delimiter tokens ( #12916 )
2023-09-10 13:09:56 +02:00
José Valim
1a04a8216d
Do not add extra newlines after hints
2023-06-24 17:05:50 +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
bacea2cef6
Keep capture operator on container cursor to quoted
2023-06-12 10:43:51 +02:00
José Valim
7711aa1919
Improve heredoc warning
2023-06-08 16:14:55 +02:00
Wojtek Mach
1e3341382f
Fix Macro.to_string/1 and ExUnit diffs for multi-letter sigils ( #12627 )
2023-06-01 16:17:51 +02:00
José Valim
ca0d6ad60c
Keep operators and identifiers in container_cursor_to_quoted
2023-05-19 22:59:48 +02:00
José Valim
d1d3a083cb
Support operators in container_cursor_to_quoted
2023-05-19 20:46:39 +02:00
José Valim
faf81cd92c
Improve docs for fragments, keep previous lines in blocks
2023-05-18 22:33:47 +02:00
Wojtek Mach
fb1f1830b0
Improve sigil SyntaxError ( #12555 )
...
Before this patch we had:
iex(1)> ~Decimal"1"
** (SyntaxError) iex:1:1: invalid sigil name, it should be either a one-letter lowercase letter or a sequence of uppercase letters only~Decimal"1"
Now, it's:
iex(1)> ~Decimal"1"
** (SyntaxError) iex:1:1: invalid sigil name, it should be either a one-letter lowercase letter or a sequence of uppercase letters only, got: ~Decimal"1"
2023-05-09 12:25:36 +02:00
José Valim
97d4cd624f
Properly keep context in map update fragment: %{map |
2023-05-04 13:15:33 +02:00
Andrea Leopardi
c402e8336c
Add support for multi-letter uppercase sigils ( #12448 )
2023-03-05 13:10:28 -06:00
José Valim
b24869687b
Introduce mechanism to collect several errors in a module ( #12275 )
2022-11-28 15:40:30 +01:00
José Valim
386113af86
Include snippets in more syntax errors
2022-10-25 12:52:20 +02:00
José Valim
e070d4fbf4
Use correct column in invalid alias terminator
2022-10-11 14:56:34 +02:00
José Valim
9fb3cf6030
Fix ambiguity in &INT with brackets
2022-10-08 10:52:37 +02:00
José Valim
b7dd72f567
Improve error message for invalid % { syntax
2022-09-27 18:56:29 +02:00
José Valim
2a78d378cd
Add TODOs
2022-08-23 08:53:38 +02:00
José Valim
8fc62b814e
Add TODO related to ...
2022-07-25 09:31:21 +02:00
José Valim
03ffc663e7
Add autocompletion of binary modifiers in IEx
...
Macro.path/2 was added as a helper function for
traversing expressions and returning their context.
2022-07-09 17:06:04 +02:00
José Valim
410c468467
Remove outdated TODO
2022-06-19 23:00:10 +02:00
Udo Kramer
3b5718cc4c
Fix typos ( #11901 )
2022-06-03 11:14:21 +02:00
José Valim
850c7ddfe4
Normalize unicode characters once in tokenizer
2022-05-23 12:14:39 +03:00
José Valim
25212f2db1
Do not attempt to suggest starting tokens
...
It is hard to suggest because it is not possible to
know if the user intended an operator, alias, or
identifier, so we can give incorrect feedback.
2022-05-23 12:14:39 +03:00
Luc Fueston
31cbdbd6e0
nfc and additional normalizations for identifiers ( #11859 )
...
* nfc by default
* suggest nfkc on unexpected tokens when nfkc would have worked
* support additional normalizations (just micro/mu for now)
* parser, formatter tests
* tweak Macro.inner_classify(atom) not to rely on not_nfc causing error
2022-05-23 09:44:44 +02:00
Colin Caine
26df5b827c
Improve warning on quoted atoms, calls, and keywords ( #11838 )
...
The warning messages stated that an atom containing starting with a
number and containing only ASCII letters, numbers and underscores does
not require quoting, for example `:401`, but this is not the case; `:401` is a
syntax error, as is `:1a` and so on.
This commit changes the warning message to make clear that unquoted
atoms/calls and keywords must not start with a number.
2022-05-16 18:03:54 +02:00
José Valim
0fdca7b8ac
Improve error message clarity
2022-03-23 18:48:42 +01:00
José Valim
b52f274406
Add .. as a nullary operator that returns 0..-1//1 ( #11623 )
2022-02-13 15:18:53 +01:00
José Valim
2676f8b221
Allow only single- and highly restricted mixed-scripts in identifiers (UTS39 C3) ( #11621 )
2022-02-11 20:44:06 +01: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
Luc Fueston
cba50b7a28
Warn on confusable non-ascii identifiers (UTS 39, C2) ( #11582 )
2022-01-21 09:37:25 +01:00
Paulo Daniel Gonzalez
ef2e544749
Add nudge to do expression error ( #11552 )
...
Closes https://github.com/elixir-lang/elixir/issues/11551
2022-01-07 20:41:26 +01:00