Lukas Wirth
c08d419fba
HasGenericArgs syntax trait
2024-07-07 11:18:28 +02:00
Lukas Wirth
ce5046be50
Run codegen commands as tests if their results are commited
2024-07-07 09:14:50 +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
b38d5394bb
internal: Move grammar codegen into xtask
2024-03-19 10:57:53 +01:00
Lukas Wirth
4b679f90dd
Generate AST in a more stable manner
2024-03-18 09:24:10 +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
hkalbasi
9564773d5e
Improve pattern matching MIR lowering
2023-03-17 13:08:36 +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
Daniel Eades
cc80c5bd07
remove unnecessary lazy evaluations
2023-01-02 15:02:54 +00: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
Kartavya Vashishtha
bcab4be938
regenerate files with new syntax
2022-08-07 17:38:20 +05:30
Lukas Wirth
bf893d59b5
internal: Assume condition/iterable is missing if there is only a BlockExpr
2022-07-27 17:29:51 +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
c0d6471143
fix: Recognize Self
as a proper keyword
2022-03-05 23:20:06 +01:00
bors[bot]
8f504dc873
Merge #11598
...
11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2
Part of #11532 .
Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into
```rust
{
let (<gensym_a>, <gensym_b>) = (b, a);
a = <gensym_a>;
b = <gensym_b>;
}
```
rustc uses hygiene to implement that, but we don't support hygiene yet.
However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error.
I'm still looking for the best way to do lowering, though.
Fixes #11454 .
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2022-03-05 11:31:29 +00:00
Chayim Refael Friedman
d9f0731bd2
Parse destructuring assignment
...
The only patterns we should parse are `..` in structs and `_`: the rest are either not supported or already valid expressions.
2022-03-02 01:51:25 +00:00
Laurențiu Nicola
87c4a4104d
Fix body selection in while loops
2022-02-26 16:45:06 +02:00
Chayim Refael Friedman
2df7a1af17
Generate AST code after rust-analyzer/ungrammar#46
2022-02-25 01:25:42 +00:00
Chayim Refael Friedman
de8633f15f
Parse let
expressions in order to support let
chains
...
We still need to reject freestanding `let` expressions: see https://github.com/rust-analyzer/rust-analyzer/issues/11320#issuecomment-1018212465 .
2022-02-21 08:34:34 +02:00
Jonas Schievink
67f548d8e9
Allow doc comments on all Item
s
2022-01-08 15:27:48 +01:00
Lukas Wirth
69dbfc7754
Generate AnyHasDocComments
node
2022-01-07 12:38:18 +01:00
Lukas Wirth
c93983e76f
Fix for-loop expressions breaking with BlockExpr iterable
2021-10-30 16:37:32 +02:00
Lukas Wirth
b219a4c465
internal: Parse const trait bounds
2021-10-19 14:20:00 +02:00
Jonas Schievink
f8acae7895
Support let...else
2021-10-07 17:06:24 +02:00
bors[bot]
94fa49c0a3
Merge #10420
...
10420: Parse outer attributes on StructPatternEtCetera r=jonas-schievink a=XFFXFF
Try to fix https://github.com/rust-analyzer/rust-analyzer/issues/8610
Related pr in ungrammer: https://github.com/rust-analyzer/ungrammar/pull/41
Co-authored-by: zhoufan <1247714429@qq.com>
2021-10-06 15:05:40 +00:00
Aleksey Kladov
f04f8ddb0d
minor: regen
2021-10-02 15:20:16 +03:00