Skip to content

Commit 2dfda0b

Browse files
bors[bot]matklad
andauthored
Merge #5572
5572: Switch to ungrammar from ast_src r=matklad a=matklad The primary advantage of ungrammar is that it (eventually) allows one to describe concrete syntax tree structure -- with alternatives and specific sequence of tokens & nodes. That should be re-usable for: * generate `make` calls * Rust reference * Hypothetical parser's evented API We loose doc comments for the time being unfortunately. I don't think we should add support for doc comments to ungrammar -- they'll make grammar file hard to read. We might supply docs as out-of band info, or maybe just via a reference, but we'll think about that once things are no longer in flux bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 525ae70 + 3d28292 commit 2dfda0b

File tree

9 files changed

+1596
-4197
lines changed

9 files changed

+1596
-4197
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ra_hir_def/src/type_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! HIR for references to types. Paths in these are not yet resolved. They can
22
//! be directly created from an ast::TypeRef, without further queries.
33
4-
use ra_syntax::ast::{self, TypeAscriptionOwner, TypeBoundsOwner};
4+
use ra_syntax::ast::{self, TypeAscriptionOwner};
55

66
use crate::{body::LowerCtx, path::Path};
77

crates/ra_syntax/src/ast/expr_ext.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use crate::{
77
SyntaxToken, T,
88
};
99

10+
impl ast::AttrsOwner for ast::Expr {}
11+
1012
impl ast::Expr {
1113
pub fn is_block_like(&self) -> bool {
1214
match self {

0 commit comments

Comments
 (0)