File tree 1 file changed +4
-2
lines changed
crates/pgt_statement_splitter/src
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -165,18 +165,20 @@ impl Parser {
165
165
}
166
166
167
167
#[ cfg( windows) ]
168
- /// Returns true if the token is relevant for the paring process
168
+ /// Returns true if the token is relevant for the parsing process
169
169
///
170
170
/// On windows, a newline is represented by `\r\n` which is two characters.
171
171
fn is_irrelevant_token ( t : & Token ) -> bool {
172
172
WHITESPACE_TOKENS . contains ( & t. kind )
173
+ // double new lines are relevant, single ones are not
173
174
&& ( t. kind != SyntaxKind :: Newline || t. text == "\r \n " || t. text . chars ( ) . count ( ) == 1 )
174
175
}
175
176
176
177
#[ cfg( not( windows) ) ]
177
- /// Returns true if the token is relevant for the paring process
178
+ /// Returns true if the token is relevant for the parsing process
178
179
fn is_irrelevant_token ( t : & Token ) -> bool {
179
180
WHITESPACE_TOKENS . contains ( & t. kind )
181
+ // double new lines are relevant, single ones are not
180
182
&& ( t. kind != SyntaxKind :: Newline || t. text . chars ( ) . count ( ) == 1 )
181
183
}
182
184
You can’t perform that action at this time.
0 commit comments