Files
linguist/samples/Swift/section-23.swift
Andy Lindeman 8f251e6756 Adds basic support for the Swift programming language
Text only lexer for now until Pygments catches up
2014-06-02 15:54:05 -04:00

12 lines
423 B
Swift

let vegetable = "red pepper"
switch vegetable {
case "celery":
let vegetableComment = "Add some raisins and make ants on a log."
case "cucumber", "watercress":
let vegetableComment = "That would make a good tea sandwich."
case let x where x.hasSuffix("pepper"):
let vegetableComment = "Is it a spicy \(x)?"
default:
let vegetableComment = "Everything tastes good in soup."
}