mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 00:21:38 -05: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:
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user