separete structure from symbols

This commit is contained in:
Aleksey Kladov 2018-08-14 11:20:09 +03:00
parent 49ab441024
commit 2b828c68e8
9 changed files with 131 additions and 39 deletions

View file

@ -10,8 +10,9 @@ use {
};
pub use self::generated::*;
pub trait AstNode<R: TreeRoot>: Sized {
fn cast(syntax: SyntaxNode<R>) -> Option<Self>;
pub trait AstNode<R: TreeRoot> {
fn cast(syntax: SyntaxNode<R>) -> Option<Self>
where Self: Sized;
fn syntax(&self) -> &SyntaxNode<R>;
}