Skip to content
Snippets Groups Projects
Commit 6b1e2e3d authored by radex's avatar radex
Browse files

Swift 2: #available(…) macro

parent 539a789d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -83,6 +83,8 @@ module Rouge
groups Keyword::Declaration, Error, Keyword::Declaration
end
end
rule /#available\([^)]+\)/, Keyword::Declaration
 
rule /(let|var)\b(\s*)(#{id})/ do
groups Keyword, Text, Name::Variable
Loading
Loading
Loading
Loading
@@ -227,6 +227,13 @@ repeat {
// loop…
} while condition
 
if #available(iOS 8.0, OSX 10.10, *) {
// Use Handoff APIs when available.
let activity = NSUserActivity(activityType:"com.example.ShoppingList.view")
} else {
// Fall back when Handoff APIs not available.
}
//MARK: Classes
public class Person : NSObject {
let firstName: String
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment