aboutsummaryrefslogtreecommitdiff
path: root/crates/parser
Commit message (Collapse)AuthorAgeFilesLines
* Complete `repr` attribute parametersLukas Wirth2021-06-171-2/+1
|
* Merge #9260bors[bot]2021-06-141-1/+1
|\ | | | | | | | | | | | | | | 9260: tree-wide: make rustdoc links spiky so they are clickable r=matklad a=lf- Rustdoc was complaining about these while I was running with --document-private-items and I figure they should be fixed. Co-authored-by: Jade <[email protected]>
| * tree-wide: make rustdoc links spiky so they are clickableJade2021-06-141-1/+1
| |
* | Update ungrammarJonas Schievink2021-06-112-1/+4
|/
* Apply more clippy suggestions and update generatedClemens Wasser2021-06-031-106/+23
|
* Apply a few clippy suggestionsClemens Wasser2021-06-032-28/+109
|
* Add even more docsAleksey Kladov2021-05-2217-30/+4
|
* Add `=` to pattern recoveryLukas Wirth2021-05-081-1/+1
|
* Parse const param defaultsJonas Schievink2021-04-292-0/+42
|
* Correctly parse negated literals as const argsJonas Schievink2021-04-291-0/+9
|
* Parse outer atttributes for RecordPatFieldLukas Wirth2021-04-211-2/+4
|
* hir_ty: Expand macros at type positioncynecx2021-04-171-3/+7
|
* Handle extended key value attr in mbeEdwin Cheng2021-04-172-48/+17
|
* Parse extended_key_value_attributesLukas Wirth2021-03-191-2/+2
|
* Correctly parse attributes on fn parametersJonas Schievink2021-03-171-7/+22
|
* Fix macro expansion for statements w/o semicolonEdwin Cheng2021-03-162-6/+6
|
* Fix remaining references to `cargo xtask codegen`Lukas Wirth2021-03-121-1/+1
|
* Fix fail to parse :: for meta in mbeEdwin Cheng2021-03-051-1/+2
|
* Specialization for async traitsArnaud2021-02-151-0/+28
|
* Pin Rust to 1.49.0 on CIJonas Schievink2021-02-121-5/+6
|
* Add validation for mutable const itemsLukas Wirth2021-01-241-1/+1
|
* Merge #7341bors[bot]2021-01-181-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7341: Fix warnings when running `cargo doc --document-private-items` r=Veykril a=jyn514 These were the warnings previously: <details> ``` warning: could not parse code block as Rust code --> crates/stdx/src/lib.rs:137:9 | 137 | /// ∀ x in slice[..idx]: pred(x) | _________^ 138 | | /// && ∀ x in slice[idx..]: !pred(x) | |____^ | = note: error from rustc: unknown start of token: \u{2200} warning: 1 warning emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted ``` </details> This does *not* fix the following warning, because it is actually rust code and rustdoc is being over eager: ``` warning: Rust code block is empty --> crates/parser/src/grammar.rs:16:5 | 16 | //! ``` | _____^ 17 | | //! // test function_with_zero_parameters 18 | | //! // fn foo() {} 19 | | //! ``` | |_______^ | help: mark blocks that do not contain Rust code as text | 16 | //! ```text | ^^^^^^^ ``` https://github.com/rust-lang/rust/pull/79816 should make this configurable so the warning can be `allow`ed. Co-authored-by: Joshua Nelson <[email protected]>
| * Fix warnings when running `cargo doc --document-private-items`Joshua Nelson2021-01-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were the warnings previously: ``` warning: could not parse code block as Rust code --> crates/stdx/src/lib.rs:137:9 | 137 | /// ∀ x in slice[..idx]: pred(x) | _________^ 138 | | /// && ∀ x in slice[idx..]: !pred(x) | |____^ | = note: error from rustc: unknown start of token: \u{2200} warning: 1 warning emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted ``` This does *not* fix the following warning, because it is actually rust code and rustdoc is being over eager: ``` warning: Rust code block is empty --> crates/parser/src/grammar.rs:16:5 | 16 | //! ``` | _____^ 17 | | //! // test function_with_zero_parameters 18 | | //! // fn foo() {} 19 | | //! ``` | |_______^ | help: mark blocks that do not contain Rust code as text | 16 | //! ```text | ^^^^^^^ ``` https://github.com/rust-lang/rust/pull/79816 should make this configurable so the warning can be `allow`ed.
* | Parse `impl const Trait`Lukas Wirth2021-01-181-0/+4
|/
* Add `MacroType` syntaxJonas Schievink2021-01-181-0/+1
|
* Merge #7291bors[bot]2021-01-183-15/+30
|\ | | | | | | | | | | | | | | 7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril That should be the remaining special casing for `self` 🎉 Co-authored-by: Lukas Wirth <[email protected]>
| * Wrap remaining self/super/crate in Name{Ref}Lukas Wirth2021-01-153-15/+30
| |
* | Add missing inlinesAleksey Kladov2021-01-171-0/+3
|/
* Handle self/super/crate in PathSegment as NameRefLukas Wirth2021-01-151-1/+5
|
* Add support for yiled keywordDaiki Ihara2021-01-152-2/+22
|
* Merge #7211bors[bot]2021-01-141-3/+13
|\ | | | | | | | | | | | | | | | | | | | | | | 7211: Fixed expr meta var after path colons in mbe r=matklad a=edwin0cheng Fixes #7207 Added `L_DOLLAR` in `ITEM_RECOVERY_SET` , but I don't know whether it is a good idea. r? @matklad Co-authored-by: Edwin Cheng <[email protected]>
| * Fixed expr meta var after path colons in mbeEdwin Cheng2021-01-101-3/+13
| |
* | Merge #7218bors[bot]2021-01-101-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 7218: Fix typos r=Veykril a=regexident Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking. Co-authored-by: Vincent Esche <[email protected]>
| * | Fixed typos in code commentsVincent Esche2021-01-091-1/+1
| |/
* | Replace SyntaxKind usage with T! macro where applicableLukas Wirth2021-01-105-19/+27
| |
* | Use T! for bool keywordsLaurențiu Nicola2021-01-101-1/+1
| |
* | Allow `true` and `false` keywords in const genericsCallym2021-01-101-1/+5
|/
* parser,syntax: Add separate parser for stmt with optional semicolonMarijn Suijten2021-01-032-0/+6
| | | | | Adjusting `grammar::fragments::stmt` to Optional or Yes will break original functionality and tests.
* Fix mbe fail to pass expr with attrEdwin Cheng2020-12-281-1/+1
|
* Fix macro_rules not accepting brackets or parenthesesLukas Wirth2020-12-241-2/+7
|
* Remove local ungrammar dependencyLukas Wirth2020-12-231-3/+1
|
* Parse const effect blockLukas Wirth2020-12-232-2/+14
|
* Parse ConstBlockPatLukas Wirth2020-12-231-0/+16
|
* Update ungrammar for const block patternsLukas Wirth2020-12-231-0/+1
|
* Merge #6965bors[bot]2020-12-212-12/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6965: Properly attach attributes to Param instead of parent ParamList r=matklad a=Veykril Fixes #2783, fixes #2781 The problem with `let _a = [0,#[cfg(feature = "L")]0];` has already been fixed some time ago it seems: <details> <summary>Syntax Tree for the const item</summary> ``` [email protected] [email protected] "let" [email protected] " " [email protected] [email protected] [email protected] "_a" [email protected] " " [email protected] "=" [email protected] " " [email protected] [email protected] "[" [email protected] [email protected] "0" [email protected] "," [email protected] [email protected] [email protected] "#" [email protected] "[" [email protected] [email protected] [email protected] [email protected] "cfg" [email protected] [email protected] "(" [email protected] "feature" [email protected] " " [email protected] "=" [email protected] " " [email protected] "\"L\"" [email protected] ")" [email protected] "]" [email protected] "0" [email protected] "]" [email protected] ";" ``` </details> Co-authored-by: Lukas Wirth <[email protected]>
| * Parse attributes in tuple expressionsLukas Wirth2020-12-201-3/+5
| |
| * Properly attach attributes to Param instead of parent ParamListLukas Wirth2020-12-201-9/+8
| |
* | Merge #6967bors[bot]2020-12-212-9/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | 6967: Correctly parse legacy trait objects with leading ForType r=matklad a=Veykril Fixes #1422 Co-authored-by: Lukas Wirth <[email protected]>
| * | Properly parse legacy trait objects with leading ForTypeLukas Wirth2020-12-202-9/+19
| |/
* / Use pattern_single instead of pattern in mbe patEdwin Cheng2020-12-202-2/+2
|/