diff options
author | Aleksey Kladov <[email protected]> | 2019-04-02 11:02:23 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-04-02 11:02:23 +0100 |
commit | ab19ff16e55d4d64445fc2809e52d913ad492040 (patch) | |
tree | 32ae51ee2d96c526bcfb9eb3f3a8adf18aca39c6 /crates/ra_syntax/src | |
parent | 0e1e40676a82af782da2593c258c9af52ab78757 (diff) |
add minimal comments
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/expr_extensions.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/tokens.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 4 |
5 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index dcc71eabe..9f5c41b0c 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | //! Abstract Syntax Tree, layered on top of untyped `SyntaxNode`s | 1 | //! Abstract Syntax Tree, layered on top of untyped `SyntaxNode`s |
2 | |||
2 | mod generated; | 3 | mod generated; |
3 | mod traits; | 4 | mod traits; |
4 | mod tokens; | 5 | mod tokens; |
@@ -44,6 +45,7 @@ pub trait AstToken<'a> { | |||
44 | } | 45 | } |
45 | } | 46 | } |
46 | 47 | ||
48 | /// An iterator over `SyntaxNode` children of a particular AST type. | ||
47 | #[derive(Debug)] | 49 | #[derive(Debug)] |
48 | pub struct AstChildren<'a, N> { | 50 | pub struct AstChildren<'a, N> { |
49 | inner: SyntaxNodeChildren<'a>, | 51 | inner: SyntaxNodeChildren<'a>, |
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs index b24f86cec..1d8313810 100644 --- a/crates/ra_syntax/src/ast/expr_extensions.rs +++ b/crates/ra_syntax/src/ast/expr_extensions.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! Various extension methods to ast Expr Nodes, which are hard to code-generate. | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | SyntaxToken, SyntaxElement, SmolStr, | 4 | SyntaxToken, SyntaxElement, SmolStr, |
3 | ast::{self, AstNode, AstChildren, children, child_opt}, | 5 | ast::{self, AstNode, AstChildren, children, child_opt}, |
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 342581faf..aec57c380 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -1,3 +1,6 @@ | |||
1 | //! Various extension methods to ast Nodes, which are hard to code-generate. | ||
2 | //! Extensions for various expressions live in a sibling `expr_extensions` module. | ||
3 | |||
1 | use itertools::Itertools; | 4 | use itertools::Itertools; |
2 | 5 | ||
3 | use crate::{ | 6 | use crate::{ |
diff --git a/crates/ra_syntax/src/ast/tokens.rs b/crates/ra_syntax/src/ast/tokens.rs index 7c30ff15c..da7d507bf 100644 --- a/crates/ra_syntax/src/ast/tokens.rs +++ b/crates/ra_syntax/src/ast/tokens.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! There are many AstNodes, but only a few tokens, so we hand-write them here. | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | SyntaxToken, | 4 | SyntaxToken, |
3 | SyntaxKind::{COMMENT, WHITESPACE}, | 5 | SyntaxKind::{COMMENT, WHITESPACE}, |
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index 98aa22085..aaf07d731 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs | |||
@@ -1,3 +1,7 @@ | |||
1 | //! Various traits that are implemented by ast nodes. | ||
2 | //! | ||
3 | //! The implementations are usually trivial, and live in generated.rs | ||
4 | |||
1 | use itertools::Itertools; | 5 | use itertools::Itertools; |
2 | 6 | ||
3 | use crate::{ | 7 | use crate::{ |