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
Pol Valletbó
e1aeb7fa79
fix: handle errors for string byte string and c_string
2023-10-11 15:25:52 +02:00
Pol Valletbó
677e6f3439
fix: use unescape_byte function for Byte literals
2023-10-11 13:09:15 +02:00
Pol Valletbó
1fe6ac87e9
add diagnosis messages for chars and byte literal errors
2023-10-11 12:19:00 +02:00
Lukas Wirth
a382e649ca
Recover better on missing parameter in param list
2023-09-29 12:50:16 +02:00
Lukas Wirth
3fa0bf0dd3
Fix ide-diagnostics test fixture
2023-09-06 18:31:16 +02:00
Lukas Wirth
abe8f1ece4
Implement builtin#format_args, using rustc's format_args parser
2023-09-05 19:19:46 +02:00
Lukas Wirth
3431d586e5
Insert builtin#asm into asm! expansion
2023-09-05 14:00:49 +02:00
Lukas Wirth
15048304e3
Implement offset_of in hir-def and hir-ty
2023-09-05 12:27:52 +02:00
ponyii
4ebdc6f052
syntax update: the default value of ConstParam
turned from Expr
into ConstArg
2023-08-08 21:57:54 +04:00
Ryo Yoshida
004971f3f0
Remove crate
visibility modifier
2023-07-16 00:01:11 +09:00
Ryo Yoshida
49b039f1d1
Recover from missing associated items and generic const defaults
2023-07-05 00:24:11 +09:00
hkalbasi
f8594f78bb
Use ConstArg
instead of Expr
for AstId
of InTypeConstId
2023-06-11 00:39:28 +03:30
Ryo Yoshida
f9c1a7dcd9
fix: assignment operators are right associative
2023-06-03 19:58:35 +09:00