Update Swift Autocompletion Syntax

Performed updates to the Swift Snippets JSON so that they match the latest language syntax

Updated :

- print()
- repeat {} while

Added :

- Guard statement
- Optional Binding Statement
This commit is contained in:
Alexis Aubry 2016-02-20 15:18:59 +01:00
parent 2754e11383
commit 5f71983134

View file

@ -1,22 +1,22 @@
{
"println(\"...\")": {
"print(\"...\")": {
"prefix": "pr",
"body": "println(\"$1\")$0"
"body": "print(\"$1\")$0"
},
"println(\"\\(...)\")": {
"print(\"\\(...)\")": {
"prefix": "po",
"body": "println(\"\\($1)\")$0"
"body": "print(\"\\($1)\")$0"
},
"do...while loop": {
"repeat...while loop": {
"prefix": "do",
"prefix": "repeat",
"body": [
"do {",
"repeat {",
" $0",
"} while ${true}"
],
"description": "do...while loop"
"description": "repeat...while loop"
},
"While loop": {
@ -96,6 +96,28 @@
"description": "Else statement"
},
"Guard statement": {
"prefix": "guard",
"body": [
"guard let ${a} = ${optional} else {",
" $0",
"}"
],
"description": "Guard statement"
},
"Optional Binding statement": {
"prefix": "ifnil",
"body": [
"if let ${a} = ${optional} {",
" $0",
"}"
],
"description": "Optional Binding statement"
},
"Switch statement": {
"prefix": "switch",
@ -133,4 +155,4 @@
],
"description": "Enum"
}
}
}