@@ -186,7 +186,7 @@ public class PrettyPrinter {
186
186
outputBuffer. append ( String ( str) )
187
187
}
188
188
189
- /// Writes newlines into the output stream, taking into account any pre-existing consecutive
189
+ /// Writes newlines into the output stream, taking into account any preexisting consecutive
190
190
/// newlines and the maximum allowed number of blank lines.
191
191
///
192
192
/// This function does some implicit collapsing of consecutive newlines to ensure that the
@@ -248,7 +248,7 @@ public class PrettyPrinter {
248
248
/// Print out the provided token, and apply line-wrapping and indentation as needed.
249
249
///
250
250
/// This method takes a Token and it's length, and it keeps track of how much space is left on the
251
- /// current line it is printing on. If a token exceeds the remaning space, we break to a new line,
251
+ /// current line it is printing on. If a token exceeds the remaining space, we break to a new line,
252
252
/// and apply the appropriate level of indentation.
253
253
///
254
254
/// - Parameters:
@@ -569,7 +569,7 @@ public class PrettyPrinter {
569
569
///
570
570
/// - Returns: A String containing the formatted source code.
571
571
public func prettyPrint( ) -> String {
572
- // Keep track of the indicies of the .open and .break token locations.
572
+ // Keep track of the indices of the .open and .break token locations.
573
573
var delimIndexStack = [ Int] ( )
574
574
// Keep a running total of the token lengths.
575
575
var total = 0
@@ -584,7 +584,7 @@ public class PrettyPrinter {
584
584
lengths. append ( 0 )
585
585
586
586
// Open tokens have lengths equal to the total of the contents of its group. The value is
587
- // calcualted when close tokens are encountered.
587
+ // calculated when close tokens are encountered.
588
588
case . open:
589
589
lengths. append ( - total)
590
590
delimIndexStack. append ( i)
0 commit comments