7676(defun swift-mode:token (type text start end )
7777 " Construct and return a token.
7878
79- TYPE is the type of the token such as `inix -operator' or {.
79+ TYPE is the type of the token such as `infix -operator' or {.
8080TEXT is the text of the token.
8181START is the start position of the token.
8282END is the point after the token."
@@ -98,7 +98,7 @@ END is the point after the token."
9898 " Return the end position of TOKEN."
9999 (nth 3 token))
100100
101- ; ; Token types is one of the follwing symbols:
101+ ; ; Token types is one of the following symbols:
102102; ;
103103; ; - prefix-operator (including try, try?, and try!)
104104; ; - postfix-operator
@@ -124,7 +124,7 @@ END is the point after the token."
124124; ; - string-chunk-before-interpolated-expression (part of a string ending with "\\ (")
125125; ; - outside-of-buffer
126126; ;
127- ; ; Additionaly , `swift-mode:backward-token-or-list' may return a parenthesized
127+ ; ; Additionally , `swift-mode:backward-token-or-list' may return a parenthesized
128128; ; expression as a token with one of the following types:
129129; ; - ()
130130; ; - []
@@ -376,13 +376,13 @@ Return nil otherwise."
376376 (setq next-token (swift-mode:token 'identifier " " (point ) (point ))))
377377 (cond
378378 ((or
379- ; ; Supresses implicit semicolon around binary operators and separators.
379+ ; ; Suppresses implicit semicolon around binary operators and separators.
380380 (memq (swift-mode:token:type previous-token)
381381 '(binary-operator \; \, :))
382382 (memq (swift-mode:token:type next-token)
383383 '(binary-operator \; \, :))
384384
385- ; ; Supresses implicit semicolon after try, try?, and try!.
385+ ; ; Suppresses implicit semicolon after try, try?, and try!.
386386 (member (swift-mode:token:text previous-token)
387387 '(" try" " try?" " try!" ))
388388
@@ -419,7 +419,7 @@ Return nil otherwise."
419419 ; ; }
420420 ((eq (swift-mode:token:type next-token) '\{ ) t )
421421
422- ; ; Supress implicit semicolon after attributes.
422+ ; ; Suppress implicit semicolon after attributes.
423423 ((eq (swift-mode:token:type previous-token) 'attribute )
424424 nil )
425425
@@ -450,7 +450,7 @@ Return nil otherwise."
450450
451451 ; ; Insert implicit semicolon before modifiers.
452452 ; ;
453- ; ; Preceding mofidiers takes precedence over this.
453+ ; ; Preceding modifiers takes precedence over this.
454454 ((member (swift-mode:token:text next-token)
455455 '(" indirect" " convenience" " dynamic" " final" " infix" " lazy"
456456 " mutating" " nonmutating" " optional" " override" " postfix"
@@ -681,7 +681,7 @@ Return nil otherwise."
681681 ; ; switch foo {
682682 ; ; case let x where x is Foo ?
683683 ; ; a : // This function should return nil but it
684- ; ; // actually retuns t.
684+ ; ; // actually returns t.
685685 ; ; b: // This function should return t but it
686686 ; ; // actually return nil.
687687 ; ; let y = a ? b : c // This function returns nil correctly for
@@ -695,7 +695,7 @@ Return nil otherwise."
695695 '(" case" " default" ))
696696 (setq swift-mode:in-recursive-call-of-case-colon-p nil )))))
697697
698- (defun swift-mode:anonyous -parameter-in-p ()
698+ (defun swift-mode:anonymous -parameter-in-p ()
699699 " Return t if a 'in' token at the cursor is for anonymous function parameters."
700700 (save-excursion
701701 (eq
@@ -811,7 +811,7 @@ type `out-of-buffer'"
811811 (when (and (equal (swift-mode:token:text token) " in" )
812812 (save-excursion
813813 (goto-char (swift-mode:token:start token))
814- (swift-mode:anonyous -parameter-in-p)))
814+ (swift-mode:anonymous -parameter-in-p)))
815815 (setq token
816816 (swift-mode:token
817817 'anonymous-function-parameter-in
@@ -853,7 +853,7 @@ This function does not return `implicit-;' or `type-:'."
853853 ; ; Open angle bracket for type parameters
854854 ; ;
855855 ; ; We use a heuristic: spaces are inserted around inequality sign, but not
856- ; ; for angle bracket, and a type paramer starts with an upper case
856+ ; ; for angle bracket, and a type parameter starts with an upper case
857857 ; ; character, a square bracket, a parenthesis, or keyword 'protocol'.
858858 ((and (eq (char-after ) ?< )
859859 (looking-at " <\\ ([[:upper:]\\ [[(]\\ |protocol\\ )" ))
@@ -1023,7 +1023,7 @@ type `out-of-buffer'."
10231023 (when (and (equal (swift-mode:token:text token) " in" )
10241024 (save-excursion
10251025 (goto-char (swift-mode:token:start token))
1026- (swift-mode:anonyous -parameter-in-p)))
1026+ (swift-mode:anonymous -parameter-in-p)))
10271027 (setq token
10281028 (swift-mode:token
10291029 'anonymous-function-parameter-in
@@ -1095,7 +1095,7 @@ This function does not return `implicit-;' or `type-:'."
10951095 ; ; Open angle bracket for type parameters
10961096 ; ;
10971097 ; ; We use a heuristic: spaces are inserted around inequality sign, but not
1098- ; ; for angle bracket, and a type paramer starts with an upper case
1098+ ; ; for angle bracket, and a type parameter starts with an upper case
10991099 ; ; character, a square bracket, a parenthesis, or keyword `protocol' .
11001100 ((and (eq (char-before ) ?< )
11011101 (looking-at " \\ ([[:upper:]\\ [[(]\\ |protocol\\ )" ))
@@ -1273,7 +1273,7 @@ If this line ends with a single-line comment, goto just before the comment."
12731273 (swift-mode:chunk:comment-p chunk))
12741274 ; ; The cursor is in a comment.
12751275 (if (swift-mode:chunk:single-line-comment-p chunk)
1276- ; ; This ia a single-line comment
1276+ ; ; This is a single-line comment
12771277 ; ; Back to the beginning of the comment.
12781278 (goto-char (swift-mode:chunk:start chunk))
12791279 ; ; This is a multiline comment
0 commit comments