@@ -186,7 +186,7 @@ public class PrettyPrinter {
186186 outputBuffer. append ( String ( str) )
187187 }
188188
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
190190 /// newlines and the maximum allowed number of blank lines.
191191 ///
192192 /// This function does some implicit collapsing of consecutive newlines to ensure that the
@@ -248,7 +248,7 @@ public class PrettyPrinter {
248248 /// Print out the provided token, and apply line-wrapping and indentation as needed.
249249 ///
250250 /// 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,
252252 /// and apply the appropriate level of indentation.
253253 ///
254254 /// - Parameters:
@@ -569,7 +569,7 @@ public class PrettyPrinter {
569569 ///
570570 /// - Returns: A String containing the formatted source code.
571571 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.
573573 var delimIndexStack = [ Int] ( )
574574 // Keep a running total of the token lengths.
575575 var total = 0
@@ -584,7 +584,7 @@ public class PrettyPrinter {
584584 lengths. append ( 0 )
585585
586586 // 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.
588588 case . open:
589589 lengths. append ( - total)
590590 delimIndexStack. append ( i)
0 commit comments