@@ -60,7 +60,7 @@ impl Parser {
60
60
61
61
/// set a checkpoint at current depth
62
62
///
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
64
64
pub fn set_checkpoint ( & mut self , is_parsing_flat_node : bool ) {
65
65
assert ! (
66
66
self . checkpoint. is_none( ) ,
@@ -92,8 +92,6 @@ impl Parser {
92
92
/// start a new node of `SyntaxKind` at `depth`
93
93
/// handles closing previous nodes if necessary
94
94
/// and consumes token buffer before starting new node
95
- ///
96
- /// if `SyntaxKind` is `SyntaxKind::AnyStatement`, sets `is_parsing_erronous_node` to true
97
95
pub fn start_node_at ( & mut self , kind : SyntaxKind , depth : Option < i32 > ) {
98
96
let depth = depth. unwrap_or ( self . curr_depth + 1 ) ;
99
97
// close until target depth
@@ -122,7 +120,7 @@ impl Parser {
122
120
/// if `SyntaxKindType::Follow`, add token to buffer and wait until next node to apply token at same depth
123
121
/// otherwise, applies token immediately
124
122
///
125
- /// if `is_parsing_erronous_node ` is true, applies token immediately
123
+ /// if `is_parsing_flat_node ` is true, applies token immediately
126
124
pub fn token ( & mut self , kind : SyntaxKind , text : & str ) {
127
125
if self . is_parsing_flat_node {
128
126
self . inner . token ( kind, text) ;
0 commit comments