Geoffry Song
97770dc5d1
Parse try bikeshed T {} syntax
2026-02-02 18:13:10 -08:00
Lukas Wirth
9d58a93602
Merge pull request #20439 from A4-Tacks/t-macro-bracket-doc
...
Add guess braces doc `T![]` for `T_`
2025-12-21 14:19:06 +00:00
Hegui Dai
1e1849f74e
format T_
2025-11-18 21:33:19 +08:00
Deadbeef
82f174fbd9
Merge Trait and TraitAlias handling
2025-08-13 15:28:08 +08:00
A4-Tacks
883c5fc191
Add guess braces doc T![] for T_
2025-08-12 11:46:45 +08:00
Chayim Refael Friedman
bd8087e86e
Differentiate between asm!(), global_asm!() and naked_asm!(), and make only asm!() unsafe
2025-07-09 17:37:27 +03:00
Stuart Cook
9f4e2cc51d
Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, r=jieyouxu,wesleywiser
...
Implement RFC 3503: frontmatters
Tracking issue: #136889
Supercedes #137193 . This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md ).
This might break rust-analyzer. Will look into how to fix that.
Suggestions welcome for how to improve diagnostics.
2025-05-06 16:28:39 +10:00
Deadbeef
9fce1dfac5
Implement RFC 3503: frontmatters
...
Supercedes #137193
2025-05-05 23:10:08 +08:00
Lukas Wirth
7e526b6be7
Add expression fill mode variant for filling with underscore expressions
2025-04-28 10:39:36 +02:00
Prajwal S N
72c7cd3869
chore: clean up some FIXMEs
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com >
2025-04-04 17:40:56 +05:30
Lukas Wirth
d31301cbe7
refactor: Reduce codegen burden for SyntaxNode and SyntaxToken
2025-03-21 12:14:39 +01:00
Lukas Wirth
d6dc1bf05e
refactor: Reduce codegen burden for SyntaxKind
2025-03-21 12:14:39 +01:00
Prajwal S N
1f366e7efe
fix(codegen): do not generate docs with --check
...
Running `cargo codegen --check` should not generate any mdbook files,
since they are ignored in the repo and used only while releasing a new
copy of the documentation.
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com >
2025-03-17 14:40:24 +05:30
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
niller-g
18d6e281b3
Fix codegen of parser inline tests runner
...
When running `cargo codegen` the `crates/parser/test_data/generated/runner.rs` file is only updated when some file in `crates/parser/test_data/inline` changes. However this is not sufficient in all cases
2025-02-23 11:41:34 +01:00
niller-g
7236109f56
Fix parser inline tests codegen panics
...
When running `cargo codegen` the cwd="rust-analyzer" however when running `cargo test` the cwd="rust-analyzer/xtask" which makes the codegen panic
2025-02-23 11:34:44 +01:00
Lukas Wirth
4dc936bfe2
Bump proc-macro2 in xtask
2025-02-05 08:22:20 +01:00
Wilfred Hughes
deda58e8f1
manual: Convert to mdbook
...
Split manual.adoc into markdown files, one for each chapter.
For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.
For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.
See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.
This change is based on #15795 , but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com >
2025-01-24 13:23:22 -08:00
Lukas Wirth
4b6007115a
minor: New clippy lints
2025-01-06 17:57:17 +01:00
Chayim Refael Friedman
505e82c19c
Add a function to convert a SyntaxKind to its text, where possible
...
This will also help for the make's quote macro.
2024-12-30 04:01:05 +02:00
Chayim Refael Friedman
737500137f
Generate a method for static retrieval of the SyntaxKind of a node, where possible
...
This will help for the quote macro for `ast::make`.
2024-12-30 03:13:17 +02:00
Chayim Refael Friedman
0b7a6f38d7
Properly handle different defaults for severity of lints
...
Previously all lints were assumed to be `#[warn]`, and we had a hand-coded list of `#[allow]` exceptions. Now the severity is autogenerated from rustdoc output.
Also support lints that change status between editions, and the `warnings` lint group.
2024-12-11 20:48:41 +02:00
roife
834ccbffba
fix: classify safe as a contextual kw
2024-10-21 02:56:21 +08:00
Lukas Wirth
86658c66b4
Parse builtin#asm expressions
2024-09-04 14:09:03 +02:00
Lukas Wirth
f90bdfc13d
internal: Properly check the edition for edition dependent syntax kinds
2024-08-15 15:57:47 +02:00
Lukas Wirth
200a01adc4
Generate From impls for Any* nodes
2024-07-25 10:21:58 +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
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
35aa238020
Inline all the things
2024-07-07 11:18:40 +02:00
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
866102cdaf
Re-implement tidy as an xtask action
2024-07-07 09:12:16 +02:00
Lukas Wirth
986b9cf022
Move feature-doc generation to xtask codegen
2024-07-07 09:00:18 +02:00
Lukas Wirth
5802643900
Move parser test generation to xtask
2024-07-07 08:51:19 +02:00
Lukas Wirth
15973f1a55
Fix stop_watch on linux
2024-07-07 08:40:41 +02:00
Lukas Wirth
9b3e912d67
Update generated lint definitions
2024-07-07 08:35:18 +02:00
Lukas Wirth
013b6a883f
Fix up the syntax tree for macro 2.0
2024-07-03 10:41:19 +02:00
Lukas Wirth
5374ebbf36
Simplify
2024-06-30 14:00:55 +02:00
davidsemakula
e326b634d1
internal: add reserved keywords
2024-04-15 15:06:26 +03:00
Lukas Wirth
2ae3e57c26
Fix new clippy lints
2024-04-01 17:55:56 +02:00
Lukas Wirth
b38d5394bb
internal: Move grammar codegen into xtask
2024-03-19 10:57:53 +01:00
Lukas Wirth
76463eee48
Move lint definition generation into xtask/codegen
2024-03-04 17:14:14 +01:00
Lukas Wirth
0964374274
Move diagnostics docs generation into xtask/codegen
2024-03-04 17:14:14 +01:00
Lukas Wirth
03b02e6bd0
internal: Move ide-assists codegen tests into an xtask codegen command
2024-02-28 16:54:44 +01:00
Aleksey Kladov
58d2ece88a
internal: overhaul code generation
...
* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.
This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).
2021-07-03 22:11:03 +03:00
Maan2003
6cc6dee9e9
clippy::useless_conversion
2021-06-13 09:25:55 +05:30
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30