mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
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:
parent
2754e11383
commit
5f71983134
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue