mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat: add swift indents (#4756)
This commit is contained in:
parent
b231afbad1
commit
864b4171de
5 changed files with 210 additions and 0 deletions
34
tests/indent/swift/statements.swift
Normal file
34
tests/indent/swift/statements.swift
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
func Test() {
|
||||
if true {
|
||||
return
|
||||
} else if true {
|
||||
return
|
||||
}
|
||||
|
||||
switch x {
|
||||
case "1":
|
||||
print("x")
|
||||
default:
|
||||
print("y")
|
||||
@unknown default:
|
||||
print("z")
|
||||
}
|
||||
|
||||
for a in b {
|
||||
}
|
||||
|
||||
while true{
|
||||
}
|
||||
|
||||
repeat {
|
||||
|
||||
} while (true)
|
||||
|
||||
guard let name = person["name"] else {
|
||||
return
|
||||
}
|
||||
|
||||
return (
|
||||
x + 1
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue