Lukas Wirth
cddaf7485f
Merge pull request #18625 from Veykril/push-npnxwpxuzlqz
...
fix: Fix parser getting stuck for bad asm expressions
2024-12-06 05:11:08 +00:00
Lukas Wirth
4a24e729b0
fix: Fix parser getting stuck for bad asm expressions
2024-12-06 05:57:00 +01:00
Lukas Wirth
a049941c1a
fix: Fix parsing of dyn T in generic arg on 2015 edition
2024-12-05 20:26:49 +01:00
Lukas Wirth
f3d7415bd6
Parse lifetime bounds in lifetime param into TypeBoundList
...
This mainly aids in error recovery but also makes it a bit easier to handle lifetime resolution.
While doing so it also came apparent that we were not actually lowering lifetime outlives relationships within lifetime parameter declaration bounds, so this fixes that.
2024-12-05 17:52:02 +01:00
Lukas Wirth
df7ab62a06
fix: Fix parsing of integer/keyword name refs in various places
2024-12-05 15:27:50 +01:00
Lukas Wirth
65c0b29720
Fix parsing of parenthesized type args and RTN
2024-12-04 11:48:47 +01:00
Lukas Wirth
caba872f88
fix: Don't create empty path nodes
2024-12-04 07:01:45 +01:00
Lukas Wirth
b6fc9c14ac
Better parser recovery for incomplete attributes
2024-12-04 06:45:59 +01:00
Chayim Refael Friedman
210ead8454
Parse patterns with leading pipe properly in all places
2024-10-31 15:32:37 +02:00
Chayim Refael Friedman
3a8dc27e72
Only parse safe
as contextual kw in extern blocks
...
I don't like the party of `bool`s that is becoming, but two isn't worth a refactoring yet IMO.
2024-10-30 19:28:33 +02:00
Lukas Wirth
3b3a87fe9b
Merge pull request #18419 from ChayimFriedman2/leading-or
...
fix: Put leading `|` in patterns under `OrPat`
2024-10-27 11:25:16 +00:00
Chayim Refael Friedman
e12a001b55
Put leading |
in patterns under OrPat
...
Previously it was one level above, and that caused problems with macros that expand to it, because macros expect to get only one top-level node.
2024-10-27 13:11:38 +02:00
Chayim Refael Friedman
3b3beaab31
Correctly handle #""
in edition <2024
2024-10-27 00:47:13 +03:00
Lukas Wirth
95298a2e61
fix: Fix incorrect parsing of use bounds
...
Also lower them a bit more
2024-10-22 13:34:26 +02:00
roife
9f1e450c4f
feat: initial support for safe_kw in extern blocks
2024-10-20 17:12:52 +08:00
SabrinaJewson
e735906839
fix: correctly parse use
in generic parameters
2024-10-01 22:10:47 +01:00
Lukas Wirth
f74a0c8801
asm! parsing and lowering fixes
2024-09-05 15:08:16 +02:00
Lukas Wirth
811905fce8
Give InlineAsmOperand a HIR representation
2024-09-05 12:40:48 +02:00
Lukas Wirth
a600e1df73
Add Definition kind for asm register operand
2024-09-05 10:53:07 +02:00
Lukas Wirth
86658c66b4
Parse builtin#asm expressions
2024-09-04 14:09:03 +02:00
Chayim Refael Friedman
21e6058ab7
Fix Return Type Syntax to include ..
(i.e. method(..)
and not method()
) as specified in the RFC
2024-08-26 01:45:52 +03:00
winstxnhdw
4a91453409
fix: move use
parsing to outer match arm
2024-07-23 22:36:46 +01:00
winstxnhdw
e4941c0c73
chore: update codegens
2024-07-23 22:36:46 +01:00
Lukas Wirth
41603ab14e
Add missing dyn parse special cases in 2015 edition
2024-07-20 09:18:40 +02:00
Lukas Wirth
f4199f786e
Parse contextual dyn keyword properly in edition 2015
2024-07-19 20:20:30 +02:00
Lukas Wirth
d235d09bf9
Parse try
as a keyword only in edition 2018 and up
2024-07-19 15:43:20 +02:00
Lukas Wirth
713c47f25b
Add basic edition inline parser test support
2024-07-19 15:19:43 +02:00
Lukas Wirth
7a5bf92b89
Rewrite inline parser test infra to generated proper rust test cases
2024-07-18 10:03:19 +02:00
Lukas Wirth
7011094685
Add always disabled gen parse support
2024-07-17 10:49:12 +02:00
Lukas Wirth
983c9c122e
Derive kinds information from ungrammar file
2024-07-17 10:04:45 +02:00
Lukas Wirth
013b6a883f
Fix up the syntax tree for macro 2.0
2024-07-03 10:41:19 +02:00
Lukas Wirth
e1aeed3aed
Implement unsafe attribute parsing
2024-05-06 12:11:29 +02:00
Lukas Wirth
dc4e5987a4
fix: Improve error recovery for match arms
2024-03-19 10:55:47 +01:00
roife
e2daee61bc
test: add test for float_split_scientific_notation
2024-03-06 22:51:22 +08:00
Michael Goulet
3e4deab3d8
Add support for const and async trait bounds
2024-02-16 16:00:04 +00:00
Maybe Waffle
e146139957
Add support for become
expr/tail calls
2024-02-14 14:57:18 +00:00
Lukas Wirth
bf115a6064
fix: Recover from =
in record pattern field
2024-02-13 18:25:40 +01:00
Lukas Wirth
ccccc299c8
fix: Recover from =
in record constructor field assignment
2024-02-13 18:23:33 +01:00
Lukas Wirth
974e69b0c5
Recover from missing slots in delimited parsing
2024-02-08 11:14:37 +01:00
Yutaro Ohno
e865d45904
fix: Recover from missing argument in call expressions
...
Previously, when parsing an argument list with a missing argument (e.g.,
`(a, , b)` in `foo(a, , b)`), the parser would stop upon an unexpected
token (at the second comma in the example), resulting in an incorrect
parse tree.
This commit improves error handling in such cases, ensuring a more
accurate parse tree is built.
2024-02-08 10:54:04 +01:00
Young-Flash
864c3d5880
test: add method_call_missing_argument_list error test
2024-02-05 17:54:09 +08:00
bors
1ab8c7fd27
Auto merge of #16349 - Young-Flash:use_error_recovery, r=Veykril
...
fix: add error recovery for use_tree_list parsing
This PR adds error recovery for USE_TREE_LIST parsing, avoid the wrong USE_TREE_LIST making the rest parsing incorrectly.
before
![before](https://github.com/rust-lang/rust-analyzer/assets/71162630/c6643690-f25c-4ad9-93d9-e661ba5b1dc3 )
after
![after](https://github.com/rust-lang/rust-analyzer/assets/71162630/30a58c40-2711-48d2-b2e5-fb208fc8636c )
close https://github.com/rust-lang/rust-analyzer/issues/16227
2024-01-18 09:52:37 +00:00
Johann Hemmann
76c67dd229
Fix test
2024-01-17 12:49:58 +01:00
Johann Hemmann
5916da2c29
Handle macro_rules!
as MACRO_CALL
...
It's a call of the third token is neither IDENT or TRY
2024-01-17 12:07:17 +01:00
Young-Flash
6033b66ce0
test: correct expected test result
2024-01-12 17:42:18 +08:00
Young-Flash
45eea57115
add in-comment test case for use_tree_list_err_recovery
2024-01-11 19:52:23 +08:00
Young-Flash
afe05fe1d8
fix broken test
2024-01-11 19:51:45 +08:00
Lukas Wirth
72200641c1
fix: Fix incorrect parsing error on method call on range
2024-01-08 15:09:26 +01:00
Yutaro Ohno
e076192dd8
Improve error handling for top-level let
statements
...
This commit addresses the issue of excessive and unrelated errors
generated by top-level `let` statements. Now, only a single error is
produced, indicating that `let` statements are invalid at the top level.
2023-12-01 10:37:21 +09:00
Chayim Refael Friedman
2fd19ed598
Err for comma after functional update syntax
2023-11-30 14:04:36 +02:00