-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yaroslav Yashin
committed
Aug 23, 2024
1 parent
bad2e67
commit e8a102b
Showing
2 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
(protocol_declaration | ||
declaration_kind: "protocol" @name | ||
. | ||
_ * @name | ||
. | ||
body: (protocol_body) | ||
) @item | ||
|
||
(class_declaration | ||
declaration_kind: ( | ||
[ | ||
"actor" | ||
"class" | ||
"extension" | ||
"enum" | ||
"struct" | ||
] | ||
) @name | ||
. | ||
_ * @name | ||
. | ||
body: (_) | ||
) @item | ||
|
||
(init_declaration | ||
name: "init" @name | ||
. | ||
_ * @name | ||
. | ||
body: (function_body) | ||
) @item | ||
|
||
(deinit_declaration | ||
"deinit" @name) @item | ||
|
||
(function_declaration | ||
"func" @name | ||
. | ||
_ * @name | ||
. | ||
body: (function_body) | ||
) @item | ||
|
||
(class_body | ||
(property_declaration | ||
(value_binding_pattern) @name | ||
name: (pattern) @name | ||
(type_annotation)? @name | ||
) @item | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import Foundation | ||
|
||
protocol SomeProtocol {} | ||
protocol SomeProtocol<T>: Encodable, Decodable where T == Element {} | ||
|
||
public class SomeClass: Codable { | ||
|
||
var somesss = 0 | ||
let another = 111 | ||
var sieee: Int = 11 | ||
func some(zzz: String, xxx: Int) {} | ||
public func some(sommm: Int, _ another: String) { | ||
|
||
} | ||
|
||
public func somess<T, V>(_ sss: T, xxx: V) -> V? {} | ||
public func somess<T, V>(_ sss: T, xxx: V) -> V {} | ||
func some(_ completion: @escaping ((String) -> Void)) { | ||
} | ||
func anotherFucn() -> (String, Int) {} | ||
func anotherFucn() -> [String: Int] {} | ||
func anotherFucxn() -> [String] {} | ||
func anotherFucn() -> Set<String> {} | ||
func anotherFucn() -> [String] {} | ||
func anotherFucn() async -> [String] {} | ||
func anotherFucn() throws -> [String] {} | ||
func anotherFucn() async throws -> [String] {} | ||
} | ||
|
||
func someExternalFunc() {} | ||
|
||
extension SomeProtocol: Encodable, Decodable {} | ||
|
||
actor SomeActor { | ||
var goodVar = 11 | ||
func somssssse() {} | ||
func some(x: Int, _ y: String) -> String? { | ||
var wrongVar = 111 | ||
} | ||
|
||
func llll() -> String { "" } | ||
init(_ vars: String) {} | ||
deinit {} | ||
} | ||
|
||
class SomeClass<T, V>: Codable where T: Decodable, V: Encodable { | ||
struct SomeAnother { | ||
init() { | ||
|
||
} | ||
} | ||
init<T, V>(_ sss: T, xxx: V) { | ||
|
||
} | ||
} | ||
|
||
// TODO: Some stuff | ||
// FIXME: Some fix | ||
// MARK: Some mark | ||
|
||
struct SomeAAA { | ||
struct SomeBBBB { | ||
let ppppp: Int? | ||
} | ||
enum Some { | ||
case some | ||
} | ||
var xxxx: String? | ||
} | ||
|
||
//extension SomeAAA.SomeBBBB { // breaks breadcrumbs | ||
// var someVariable: String { "" } | ||
//} |