File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
crates/pgt_statement_splitter/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -165,18 +165,20 @@ impl Parser {
165165}
166166
167167#[ 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
169169///
170170/// On windows, a newline is represented by `\r\n` which is two characters.
171171fn is_irrelevant_token ( t : & Token ) -> bool {
172172 WHITESPACE_TOKENS . contains ( & t. kind )
173+ // double new lines are relevant, single ones are not
173174 && ( t. kind != SyntaxKind :: Newline || t. text == "\r \n " || t. text . chars ( ) . count ( ) == 1 )
174175}
175176
176177#[ 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
178179fn is_irrelevant_token ( t : & Token ) -> bool {
179180 WHITESPACE_TOKENS . contains ( & t. kind )
181+ // double new lines are relevant, single ones are not
180182 && ( t. kind != SyntaxKind :: Newline || t. text . chars ( ) . count ( ) == 1 )
181183}
182184
You can’t perform that action at this time.
0 commit comments