Skip to content

Commit b7063cd

Browse files
committed
Merge pull request googlearchive#388 from chrisrecher/master
Minor fixes for Swift
2 parents 3eb4bad + 3bf6569 commit b7063cd

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/lang-swift.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// Copyright (C) 2015 Google Inc.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/**
2+
* Copyright (C) 2015 Google Inc.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
1414

1515
/**
1616
* @fileoverview
@@ -25,7 +25,7 @@
2525
*
2626
* I used https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AboutTheLanguageReference.html
2727
* as the basis for this. In particular, I targeted the revision from
28-
* 2015-04-08. Swift is still evolving, and this was the latest version
28+
* 2015-04-08. Swift is still evolving, and this was the latest version
2929
* available at the time. I will keep the code unoptimized to ease changes that come with new Swift standards.
3030
*
3131
@@ -37,7 +37,7 @@ PR['registerLangHandler'](
3737
//whitespace
3838
[PR['PR_PLAIN'], /^[ \n\r\t\v\f\0]+/, null, ' \n\r\t\v\f\0'],
3939
//string literals
40-
[PR['PR_STRING'], /^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/, null, '"'],
40+
[PR['PR_STRING'], /^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/, null, '"']
4141
],
4242
[
4343
//floating point literals
@@ -47,7 +47,7 @@ PR['registerLangHandler'](
4747
//some other literals
4848
[PR['PR_LITERAL'], /^(?:true|false|nil)\b/, null],
4949
//keywords
50-
[PR['PR_KEYWORD'], /^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|associativity|as|break|case|class|continue|convenience|default|deinit|didSet|do|dynamic|dynamicType|enum|fallthrough|final|for|func|get|import|infix|init|inout|internal|in|is|lazy|left|let|mutating|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|Protocol|public|required|return|right|safe|self|set|static|struct|subscript|super|switch|Type|typealias|unowned|unsafe|var|weak|while|willSet)\b/, null],
50+
[PR['PR_KEYWORD'], /^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|associativity|as|break|case|class|continue|convenience|default|deinit|didSet|do|dynamic|dynamicType|else|enum|fallthrough|final|for|func|get|import|infix|init|inout|internal|if|in|is|lazy|left|let|mutating|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|Protocol|public|required|return|right|safe|self|set|static|struct|subscript|super|switch|Type|typealias|unowned|unsafe|var|weak|while|willSet)\b/, null],
5151
//double slash comments
5252
[PR['PR_COMMENT'], /^\/\/.*?[\n\r]/, null],
5353
//slash star comments

0 commit comments

Comments
 (0)