Commit graph

48 commits

Author SHA1 Message Date
Arthur Baars
cb2829eaa7 Fix AsmOption rule in rust.ungram 2024-12-18 14:56:00 +01:00
Lukas Wirth
65c0b29720 Fix parsing of parenthesized type args and RTN 2024-12-04 11:48:47 +01: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
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
Lukas Wirth
811905fce8 Give InlineAsmOperand a HIR representation 2024-09-05 12:40:48 +02:00
Lukas Wirth
3b11ff8c4d Lower asm expressions 2024-09-05 09:59:08 +02:00
Lukas Wirth
86658c66b4 Parse builtin#asm expressions 2024-09-04 14:09:03 +02:00
bors
0ad26e6025 Auto merge of #17941 - ChayimFriedman2:pre-closure-to-fn, r=Veykril
Preliminary work for #17940

I split the PR as requested, and made small commits.
2024-08-26 08:09:15 +00: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
Chayim Refael Friedman
cc07652be5 Add gen modifier to functions
We don't yet lower or maybe even parse them, but blocks already have `gen`, so why not.
2024-08-24 23:46:32 +03:00
Lukas Wirth
f90bdfc13d internal: Properly check the edition for edition dependent syntax kinds 2024-08-15 15:57:47 +02:00
Winston H.
5af51fa476
fix: use cannot have optional generics
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2024-07-24 10:42:20 +01:00
winstxnhdw
fa3484f39f feat: add use type bound grammar 2024-07-23 22:36:46 +01:00
Lukas Wirth
b8cac1bb6b string is not a keyword 2024-07-17 11:11:57 +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
e1aeed3aed Implement unsafe attribute parsing 2024-05-06 12:11:29 +02:00
Lukas Wirth
5df690e13f Fixup some issues with minicore 2024-04-18 12:20:54 +02:00
Lukas Wirth
77607ab99a More precise highlighting rules for constant modifier 2024-03-17 11:26:05 +01:00
Michael Goulet
36020bb512 Update grammar
Bounds are CONSTNESS ASYNCNESS POLARITY
2024-02-16 16:16:37 +00:00
Maybe Waffle
e146139957 Add support for become expr/tail calls 2024-02-14 14:57:18 +00:00
Young-Flash
23fde40fed fix PathSegment grammar 2023-11-12 11:20:14 +08: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
Lukas Wirth
9b8eb807a3 Parse builtin# syntax 2023-09-05 10:36:35 +02:00
ponyii
4ebdc6f052 syntax update: the default value of ConstParam turned from Expr into ConstArg 2023-08-08 21:57:54 +04:00
Lukas Wirth
7c765d9f9e fix: Expand eager macros to delimited comma separated expression list 2023-07-30 17:31:26 +02:00
hkalbasi
f8594f78bb Use ConstArg instead of Expr for AstId of InTypeConstId 2023-06-11 00:39:28 +03:30
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
tamasfe
0b9c0c5088
feat(syntax): RTN in bounds
Limited syntactic support for experimental return type notations.
https://github.com/rust-lang/rust/issues/109417
2023-04-01 15:26:03 +02:00
hkalbasi
eb4939e217 Support overloaded deref MIR lowering 2023-03-17 14:02:55 +03:30
Ryo Yoshida
2e7d2c2d04
Parse trait alias as a distinct AST type 2023-03-04 00:23:56 +09:00
onestacked
872408500b Parse const_closures syntax.
Enables parsing of the syntax for `#![features(const_closures)]` introduced in https://github.com/rust-lang/rust/pull/106004
2023-01-19 15:40:07 +01:00
Maybe Waffle
346bf5fb5b Implement do yeet expression 2022-12-28 23:17:13 +00:00
Lukas Wirth
6674bd898e fix: Add trait alias grammar to rust.ungram 2022-11-11 15:25:15 +01:00
Ryo Yoshida
63cba43b48
Collect generic arguments in associated type bindings 2022-10-27 19:18:59 +09:00
Lukas Wirth
192a79c235 Remove hir::Expr::MacroStmts
This hir expression isn't needed and only existed as it was simpler to
deal with at first as it gave us a direct mapping for the ast version of
the same construct. This PR removes it, properly handling the statements
that are introduced by macro call expressions.
2022-08-31 16:58:11 +02:00
Jonas Schievink
9bd11459ba Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, r=jonas-schievink"
This reverts commit cc9ae2b89e, reversing
changes made to 7dfd1cb572.
2022-05-13 15:08:14 +02:00
Jonas Schievink
2fe38d3b63 Indicate the number of float tokens in the first token 2022-05-05 16:28:59 +02:00
Jonas Schievink
1bc3305d95 Split float literal tokens at the . 2022-05-05 16:28:58 +02:00
Jonas Schievink
502c519e7d Wrap float literals in their own node 2022-05-05 16:28:14 +02:00
XFFXFF
bdecd9374e update grammer to support associated const equality 2022-04-17 12:03:52 +08:00
Lukas Wirth
d8341c5b92 Parse for<'a> closure syntax 2022-04-10 17:50:14 +02:00
Jonas Schievink
872b7b9660 Wrap macros in expr position in MacroExpr node 2022-04-05 17:43:34 +02:00
Lukas Wirth
0d1d1dc3d9 internal: Move rust.ungram into rust-analyzer/crates/syntax 2022-04-01 17:12:33 +02:00