Skip to content

Commit ab19ff1

Browse files
committed
add minimal comments
1 parent 0e1e406 commit ab19ff1

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

crates/ra_syntax/src/ast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Abstract Syntax Tree, layered on top of untyped `SyntaxNode`s
2+
23
mod generated;
34
mod traits;
45
mod tokens;
@@ -44,6 +45,7 @@ pub trait AstToken<'a> {
4445
}
4546
}
4647

48+
/// An iterator over `SyntaxNode` children of a particular AST type.
4749
#[derive(Debug)]
4850
pub struct AstChildren<'a, N> {
4951
inner: SyntaxNodeChildren<'a>,

crates/ra_syntax/src/ast/expr_extensions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Various extension methods to ast Expr Nodes, which are hard to code-generate.
2+
13
use crate::{
24
SyntaxToken, SyntaxElement, SmolStr,
35
ast::{self, AstNode, AstChildren, children, child_opt},

crates/ra_syntax/src/ast/extensions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
14
use itertools::Itertools;
25

36
use crate::{

crates/ra_syntax/src/ast/tokens.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! There are many AstNodes, but only a few tokens, so we hand-write them here.
2+
13
use crate::{
24
SyntaxToken,
35
SyntaxKind::{COMMENT, WHITESPACE},

crates/ra_syntax/src/ast/traits.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
15
use itertools::Itertools;
26

37
use crate::{

0 commit comments

Comments
 (0)