From 3d28292157e1b6c9675ef64eddf53786c3e7dc5f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 Jul 2020 15:45:23 +0200 Subject: Switch to ungrammar from ast_src 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 --- crates/ra_syntax/src/ast/expr_ext.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_syntax/src/ast/expr_ext.rs') diff --git a/crates/ra_syntax/src/ast/expr_ext.rs b/crates/ra_syntax/src/ast/expr_ext.rs index db5438d68..69c85c809 100644 --- a/crates/ra_syntax/src/ast/expr_ext.rs +++ b/crates/ra_syntax/src/ast/expr_ext.rs @@ -7,6 +7,8 @@ use crate::{ SyntaxToken, T, }; +impl ast::AttrsOwner for ast::Expr {} + impl ast::Expr { pub fn is_block_like(&self) -> bool { match self { -- cgit v1.2.3