Skip to content

Commit 78576b5

Browse files
committed
chore: documentation
1 parent c3ff671 commit 78576b5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/parser/src/parser.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Parser {
6060

6161
/// set a checkpoint at current depth
6262
///
63-
/// if `is_parsing_flat_node` is true, all tokens will be applied immediately
63+
/// if `is_parsing_flat_node` is true, all tokens parsed until this checkpoint is closed will be applied immediately
6464
pub fn set_checkpoint(&mut self, is_parsing_flat_node: bool) {
6565
assert!(
6666
self.checkpoint.is_none(),
@@ -92,8 +92,6 @@ impl Parser {
9292
/// start a new node of `SyntaxKind` at `depth`
9393
/// handles closing previous nodes if necessary
9494
/// and consumes token buffer before starting new node
95-
///
96-
/// if `SyntaxKind` is `SyntaxKind::AnyStatement`, sets `is_parsing_erronous_node` to true
9795
pub fn start_node_at(&mut self, kind: SyntaxKind, depth: Option<i32>) {
9896
let depth = depth.unwrap_or(self.curr_depth + 1);
9997
// close until target depth
@@ -122,7 +120,7 @@ impl Parser {
122120
/// if `SyntaxKindType::Follow`, add token to buffer and wait until next node to apply token at same depth
123121
/// otherwise, applies token immediately
124122
///
125-
/// if `is_parsing_erronous_node` is true, applies token immediately
123+
/// if `is_parsing_flat_node` is true, applies token immediately
126124
pub fn token(&mut self, kind: SyntaxKind, text: &str) {
127125
if self.is_parsing_flat_node {
128126
self.inner.token(kind, text);

0 commit comments

Comments
 (0)