mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
212 lines
4.3 KiB
Plaintext
212 lines
4.3 KiB
Plaintext
|
|
public class MyClass {
|
|
|
|
public func pub_method()
|
|
|
|
deinit
|
|
}
|
|
|
|
public protocol MyProto<Assoc> {
|
|
|
|
associatedtype Assoc
|
|
}
|
|
|
|
@discardableResult
|
|
public func pub_function() -> Int
|
|
|
|
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 1,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 8,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 14,
|
|
key.length: 7
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 29,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 36,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 41,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 59,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 69,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 76,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 85,
|
|
key.length: 7
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 93,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 107,
|
|
key.length: 14
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 122,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 131,
|
|
key.length: 18
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 150,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 157,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 162,
|
|
key.length: 12
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.typeidentifier,
|
|
key.offset: 180,
|
|
key.length: 3
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.ref.associatedtype,
|
|
key.offset: 93,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.offset: 180,
|
|
key.length: 3,
|
|
key.is_system: 1
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "MyClass",
|
|
key.offset: 8,
|
|
key.length: 59,
|
|
key.nameoffset: 14,
|
|
key.namelength: 7,
|
|
key.bodyoffset: 23,
|
|
key.bodylength: 43,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 1,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
}
|
|
],
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "pub_method()",
|
|
key.offset: 36,
|
|
key.length: 17,
|
|
key.nameoffset: 41,
|
|
key.namelength: 12,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 29,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "MyProto",
|
|
key.offset: 76,
|
|
key.length: 53,
|
|
key.nameoffset: 85,
|
|
key.namelength: 7,
|
|
key.bodyoffset: 101,
|
|
key.bodylength: 27,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 69,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
}
|
|
],
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.associatedtype,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "Assoc",
|
|
key.offset: 107,
|
|
key.length: 20,
|
|
key.nameoffset: 122,
|
|
key.namelength: 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.free,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "pub_function()",
|
|
key.offset: 157,
|
|
key.length: 26,
|
|
key.typename: "Int",
|
|
key.nameoffset: 162,
|
|
key.namelength: 14,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 150,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
},
|
|
{
|
|
key.offset: 131,
|
|
key.length: 18,
|
|
key.attribute: source.decl.attribute.discardableResult
|
|
}
|
|
]
|
|
}
|
|
]
|