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
Lukas Wirth
7d1bf7023d
Recover from leading comma in tuple pat and expr
2023-06-01 08:40:50 +02:00
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
Lukas Wirth
099b5b3b15
internal: Bump rustc_lexer
2023-05-18 10:17:40 +02:00
Ryo Yoshida
fa2340a4df
Parse associated return type bounds
2023-05-06 20:31:11 +09:00
Ryo Yoshida
d7d8971203
Remove (..)
-style return type notation
2023-05-06 20:30:17 +09:00
Ryo Yoshida
2a509d0eb2
Parse bare dyn types with leading lifetime
2023-05-05 04:30:37 +09:00
bors
2400b36a2e
Auto merge of #14577 - jsoref:spelling, r=lnicola
...
Spelling
This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling ).
The misspellings have been reported at https://github.com/jsoref/rust-analyzer/actions/runs/4699991040#summary-12751355796
The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-analyzer/actions/runs/4699991284#summary-12751356293
closes #14567
2023-04-19 14:05:40 +00:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00