Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #388 from chrisrecher/master
Browse files Browse the repository at this point in the history
Minor fixes for Swift
  • Loading branch information
mikesamuel committed Sep 3, 2015
2 parents 3eb4bad + 3bf6569 commit b7063cd
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/lang-swift.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (C) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* Copyright (C) 2015 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* @fileoverview
Expand All @@ -25,7 +25,7 @@
*
* I used https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AboutTheLanguageReference.html
* as the basis for this. In particular, I targeted the revision from
* 2015-04-08. Swift is still evolving, and this was the latest version
* 2015-04-08. Swift is still evolving, and this was the latest version
* available at the time. I will keep the code unoptimized to ease changes that come with new Swift standards.
*
* @author [email protected]
Expand All @@ -37,7 +37,7 @@ PR['registerLangHandler'](
//whitespace
[PR['PR_PLAIN'], /^[ \n\r\t\v\f\0]+/, null, ' \n\r\t\v\f\0'],
//string literals
[PR['PR_STRING'], /^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/, null, '"'],
[PR['PR_STRING'], /^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/, null, '"']
],
[
//floating point literals
Expand All @@ -47,7 +47,7 @@ PR['registerLangHandler'](
//some other literals
[PR['PR_LITERAL'], /^(?:true|false|nil)\b/, null],
//keywords
[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],
[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],
//double slash comments
[PR['PR_COMMENT'], /^\/\/.*?[\n\r]/, null],
//slash star comments
Expand Down

0 comments on commit b7063cd

Please sign in to comment.