mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
205 lines
4.2 KiB
Plaintext
205 lines
4.2 KiB
Plaintext
|
|
public class MyClass {
|
|
|
|
public func pub_method()
|
|
}
|
|
|
|
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.attribute.builtin,
|
|
key.offset: 57,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 64,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 73,
|
|
key.length: 7
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 81,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 95,
|
|
key.length: 14
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 110,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 119,
|
|
key.length: 18
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 138,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 145,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 150,
|
|
key.length: 12
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.typeidentifier,
|
|
key.offset: 168,
|
|
key.length: 3
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.ref.associatedtype,
|
|
key.offset: 81,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.offset: 168,
|
|
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: 47,
|
|
key.nameoffset: 14,
|
|
key.namelength: 7,
|
|
key.bodyoffset: 23,
|
|
key.bodylength: 31,
|
|
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: 64,
|
|
key.length: 53,
|
|
key.nameoffset: 73,
|
|
key.namelength: 7,
|
|
key.bodyoffset: 89,
|
|
key.bodylength: 27,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 57,
|
|
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: 95,
|
|
key.length: 20,
|
|
key.nameoffset: 110,
|
|
key.namelength: 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.free,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "pub_function()",
|
|
key.offset: 145,
|
|
key.length: 26,
|
|
key.typename: "Int",
|
|
key.nameoffset: 150,
|
|
key.namelength: 14,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 138,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
},
|
|
{
|
|
key.offset: 119,
|
|
key.length: 18,
|
|
key.attribute: source.decl.attribute.discardableResult
|
|
}
|
|
]
|
|
}
|
|
]
|