mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Adds basic support for the Swift programming language
Text only lexer for now until Pygments catches up
This commit is contained in:
		
							
								
								
									
										20
									
								
								samples/Swift/section-77.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								samples/Swift/section-77.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| class SimpleClass: ExampleProtocol { | ||||
|      var simpleDescription: String = "A very simple class." | ||||
|      var anotherProperty: Int = 69105 | ||||
|      func adjust() { | ||||
|           simpleDescription += "  Now 100% adjusted." | ||||
|      } | ||||
| } | ||||
| var a = SimpleClass() | ||||
| a.adjust() | ||||
| let aDescription = a.simpleDescription | ||||
|  | ||||
| struct SimpleStructure: ExampleProtocol { | ||||
|      var simpleDescription: String = "A simple structure" | ||||
|      mutating func adjust() { | ||||
|           simpleDescription += " (adjusted)" | ||||
|      } | ||||
| } | ||||
| var b = SimpleStructure() | ||||
| b.adjust() | ||||
| let bDescription = b.simpleDescription | ||||
		Reference in New Issue
	
	Block a user