mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We model them that way in the compiler, but that's not part of the user-level language. rdar://problem/32067077
1017 lines
28 KiB
Plaintext
1017 lines
28 KiB
Plaintext
import SwiftOnoneSupport
|
|
|
|
class InitClassImpl : InitProto {
|
|
|
|
required init(x x: Int)
|
|
|
|
convenience init()
|
|
}
|
|
|
|
protocol InitProto {
|
|
|
|
init(x x: Int)
|
|
}
|
|
|
|
extension InitProto {
|
|
|
|
init()
|
|
}
|
|
|
|
struct InitStructImpl : InitProto {
|
|
|
|
init(x x: Int)
|
|
|
|
init()
|
|
}
|
|
|
|
protocol P1 {
|
|
|
|
func foo1()
|
|
|
|
var Ins: Int { get set }
|
|
|
|
func foo2(a a: Int, b b: Int)
|
|
|
|
subscript(_ a: Int) -> Int { get set }
|
|
|
|
func fooConstraint()
|
|
}
|
|
|
|
protocol P2 : P1 {
|
|
|
|
func bar1()
|
|
|
|
func bar2()
|
|
}
|
|
|
|
extension P2 {
|
|
|
|
func foo1()
|
|
|
|
var Ins: Int
|
|
|
|
func foo2(a a: Int, b b: Int)
|
|
|
|
subscript(_ a: Int) -> Int
|
|
}
|
|
|
|
extension P2 {
|
|
|
|
func fooConstraint()
|
|
}
|
|
|
|
protocol P3 {
|
|
|
|
func p3Required()
|
|
}
|
|
|
|
extension Dictionary.Keys where Key : Hashable {
|
|
|
|
func foo()
|
|
}
|
|
|
|
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 0,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 7,
|
|
key.length: 17
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 26,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 32,
|
|
key.length: 13
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP",
|
|
key.offset: 48,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 65,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 74,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 79,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 81,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 84,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 94,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 106,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 116,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 125,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 142,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 147,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 149,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 152,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 160,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP",
|
|
key.offset: 170,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 187,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 197,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 204,
|
|
key.length: 14
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP",
|
|
key.offset: 221,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 238,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 243,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 245,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 248,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 258,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 268,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 277,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 287,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 292,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 304,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 308,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 313,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 319,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 323,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 334,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 339,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 344,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 346,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 349,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 354,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 356,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 359,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 369,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 379,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 381,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 384,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 392,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 398,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 402,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 413,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 418,
|
|
key.length: 13
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 437,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 446,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P1",
|
|
key.usr: "s:5cake12P1P",
|
|
key.offset: 451,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 461,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 466,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 478,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 483,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 493,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P2",
|
|
key.usr: "s:5cake12P2P",
|
|
key.offset: 503,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 513,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 518,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 530,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 534,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 539,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 548,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 553,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 558,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 560,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 563,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 568,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 570,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 573,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 583,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 593,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 595,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 598,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 606,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 613,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P2",
|
|
key.usr: "s:5cake12P2P",
|
|
key.offset: 623,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 633,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 638,
|
|
key.length: 13
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 657,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 666,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 676,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 681,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 697,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Dictionary",
|
|
key.usr: "s:SD",
|
|
key.offset: 707,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Keys",
|
|
key.usr: "s:SD4KeysV",
|
|
key.offset: 718,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 723,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.typeidentifier,
|
|
key.offset: 729,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "Hashable",
|
|
key.usr: "s:SH",
|
|
key.offset: 735,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 751,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 756,
|
|
key.length: 3
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.name: "InitClassImpl",
|
|
key.usr: "s:5cake113InitClassImplC",
|
|
key.offset: 26,
|
|
key.length: 88,
|
|
key.fully_annotated_decl: "<decl.class><syntaxtype.keyword>class</syntaxtype.keyword> <decl.name>InitClassImpl</decl.name> : <ref.protocol usr=\"s:5cake19InitProtoP\">InitProto</ref.protocol></decl.class>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init(x:)",
|
|
key.usr: "s:5cake113InitClassImplC1xACSi_tcfc",
|
|
key.offset: 65,
|
|
key.length: 23,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>required</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.function.constructor,
|
|
key.name: "init(x:)",
|
|
key.usr: "s:5cake19InitProtoP1xxSi_tcfc"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "x",
|
|
key.name: "x",
|
|
key.offset: 84,
|
|
key.length: 3
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init()",
|
|
key.usr: "s:5cake19InitProtoPAAExycfc::SYNTHESIZED::s:5cake113InitClassImplC",
|
|
key.original_usr: "s:5cake19InitProtoPAAExycfc",
|
|
key.offset: 94,
|
|
key.length: 18,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>convenience</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP",
|
|
key.offset: 116,
|
|
key.length: 42,
|
|
key.fully_annotated_decl: "<decl.protocol><syntaxtype.keyword>protocol</syntaxtype.keyword> <decl.name>InitProto</decl.name></decl.protocol>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init(x:)",
|
|
key.usr: "s:5cake19InitProtoP1xxSi_tcfc",
|
|
key.offset: 142,
|
|
key.length: 14,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "x",
|
|
key.name: "x",
|
|
key.offset: 152,
|
|
key.length: 3
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.extension.protocol,
|
|
key.offset: 160,
|
|
key.length: 35,
|
|
key.extends: {
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP"
|
|
},
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init()",
|
|
key.usr: "s:5cake19InitProtoPAAExycfc",
|
|
key.offset: 187,
|
|
key.length: 6,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.struct,
|
|
key.name: "InitStructImpl",
|
|
key.usr: "s:5cake114InitStructImplV",
|
|
key.offset: 197,
|
|
key.length: 69,
|
|
key.fully_annotated_decl: "<decl.struct><syntaxtype.keyword>struct</syntaxtype.keyword> <decl.name>InitStructImpl</decl.name> : <ref.protocol usr=\"s:5cake19InitProtoP\">InitProto</ref.protocol></decl.struct>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "InitProto",
|
|
key.usr: "s:5cake19InitProtoP"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init(x:)",
|
|
key.usr: "s:5cake114InitStructImplV1xACSi_tcfc",
|
|
key.offset: 238,
|
|
key.length: 14,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.function.constructor,
|
|
key.name: "init(x:)",
|
|
key.usr: "s:5cake19InitProtoP1xxSi_tcfc"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "x",
|
|
key.name: "x",
|
|
key.offset: 248,
|
|
key.length: 3
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init()",
|
|
key.usr: "s:5cake19InitProtoPAAExycfc::SYNTHESIZED::s:5cake114InitStructImplV",
|
|
key.original_usr: "s:5cake19InitProtoPAAExycfc",
|
|
key.offset: 258,
|
|
key.length: 6,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.name: "P1",
|
|
key.usr: "s:5cake12P1P",
|
|
key.offset: 268,
|
|
key.length: 167,
|
|
key.fully_annotated_decl: "<decl.protocol><syntaxtype.keyword>protocol</syntaxtype.keyword> <decl.name>P1</decl.name></decl.protocol>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "foo1()",
|
|
key.usr: "s:5cake12P1P4foo1yyF",
|
|
key.offset: 287,
|
|
key.length: 11,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>foo1</decl.name>()</decl.function.method.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.instance,
|
|
key.name: "Ins",
|
|
key.usr: "s:5cake12P1P3InsSivp",
|
|
key.offset: 304,
|
|
key.length: 24,
|
|
key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>Ins</decl.name>: <decl.var.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "foo2(a:b:)",
|
|
key.usr: "s:5cake12P1P4foo21a1bySi_SitF",
|
|
key.offset: 334,
|
|
key.length: 29,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>foo2</decl.name>(<decl.var.parameter><decl.var.parameter.argument_label>a</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.argument_label>b</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.method.instance>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "a",
|
|
key.name: "a",
|
|
key.offset: 349,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "b",
|
|
key.name: "b",
|
|
key.offset: 359,
|
|
key.length: 3
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.subscript,
|
|
key.name: "subscript(_:)",
|
|
key.usr: "s:5cake12P1PyS2icip",
|
|
key.offset: 369,
|
|
key.length: 38,
|
|
key.fully_annotated_decl: "<decl.function.subscript><syntaxtype.keyword>subscript</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.name>a</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>) -> <decl.function.returntype><ref.struct usr=\"s:Si\">Int</ref.struct></decl.function.returntype> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.function.subscript>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "a",
|
|
key.offset: 384,
|
|
key.length: 3
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "fooConstraint()",
|
|
key.usr: "s:5cake12P1P13fooConstraintyyF",
|
|
key.offset: 413,
|
|
key.length: 20,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooConstraint</decl.name>()</decl.function.method.instance>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.name: "P2",
|
|
key.usr: "s:5cake12P2P",
|
|
key.offset: 437,
|
|
key.length: 54,
|
|
key.fully_annotated_decl: "<decl.protocol><syntaxtype.keyword>protocol</syntaxtype.keyword> <decl.name>P2</decl.name> : <ref.protocol usr=\"s:5cake12P1P\">P1</ref.protocol></decl.protocol>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P1",
|
|
key.usr: "s:5cake12P1P"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "bar1()",
|
|
key.usr: "s:5cake12P2P4bar1yyF",
|
|
key.offset: 461,
|
|
key.length: 11,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>bar1</decl.name>()</decl.function.method.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "bar2()",
|
|
key.usr: "s:5cake12P2P4bar2yyF",
|
|
key.offset: 478,
|
|
key.length: 11,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>bar2</decl.name>()</decl.function.method.instance>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.extension.protocol,
|
|
key.offset: 493,
|
|
key.length: 118,
|
|
key.extends: {
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P2",
|
|
key.usr: "s:5cake12P2P"
|
|
},
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "foo1()",
|
|
key.usr: "s:5cake12P2PAAE4foo1yyF",
|
|
key.default_implementation_of: "s:5cake12P1P4foo1yyF",
|
|
key.offset: 513,
|
|
key.length: 11,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>foo1</decl.name>()</decl.function.method.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.instance,
|
|
key.name: "Ins",
|
|
key.usr: "s:5cake12P2PAAE3InsSivp",
|
|
key.default_implementation_of: "s:5cake12P1P3InsSivp",
|
|
key.offset: 530,
|
|
key.length: 12,
|
|
key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>Ins</decl.name>: <decl.var.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "foo2(a:b:)",
|
|
key.usr: "s:5cake12P2PAAE4foo21a1bySi_SitF",
|
|
key.default_implementation_of: "s:5cake12P1P4foo21a1bySi_SitF",
|
|
key.offset: 548,
|
|
key.length: 29,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>foo2</decl.name>(<decl.var.parameter><decl.var.parameter.argument_label>a</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.argument_label>b</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.method.instance>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "a",
|
|
key.name: "a",
|
|
key.offset: 563,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "b",
|
|
key.name: "b",
|
|
key.offset: 573,
|
|
key.length: 3
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.subscript,
|
|
key.name: "subscript(_:)",
|
|
key.usr: "s:5cake12P2PAAEyS2icip",
|
|
key.default_implementation_of: "s:5cake12P1PyS2icip",
|
|
key.offset: 583,
|
|
key.length: 26,
|
|
key.fully_annotated_decl: "<decl.function.subscript><syntaxtype.keyword>subscript</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.name>a</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>) -> <decl.function.returntype><ref.struct usr=\"s:Si\">Int</ref.struct></decl.function.returntype> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.function.subscript>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "a",
|
|
key.offset: 598,
|
|
key.length: 3
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.extension.protocol,
|
|
key.generic_requirements: [
|
|
{
|
|
key.description: "Self : P3"
|
|
}
|
|
],
|
|
key.offset: 613,
|
|
key.length: 42,
|
|
key.extends: {
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "P2",
|
|
key.usr: "s:5cake12P2P"
|
|
},
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "fooConstraint()",
|
|
key.usr: "s:5cake12P2PA2A2P3RzrlE13fooConstraintyyF",
|
|
key.default_implementation_of: "s:5cake12P1P13fooConstraintyyF",
|
|
key.offset: 633,
|
|
key.length: 20,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooConstraint</decl.name>()</decl.function.method.instance>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.name: "P3",
|
|
key.usr: "s:5cake12P3P",
|
|
key.offset: 657,
|
|
key.length: 38,
|
|
key.fully_annotated_decl: "<decl.protocol><syntaxtype.keyword>protocol</syntaxtype.keyword> <decl.name>P3</decl.name></decl.protocol>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "p3Required()",
|
|
key.usr: "s:5cake12P3P10p3RequiredyyF",
|
|
key.offset: 676,
|
|
key.length: 17,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>p3Required</decl.name>()</decl.function.method.instance>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.extension.struct,
|
|
key.generic_params: [
|
|
{
|
|
key.name: "Key"
|
|
},
|
|
{
|
|
key.name: "Value"
|
|
}
|
|
],
|
|
key.generic_requirements: [
|
|
{
|
|
key.description: "Key : Hashable"
|
|
}
|
|
],
|
|
key.offset: 697,
|
|
key.length: 66,
|
|
key.extends: {
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Keys",
|
|
key.usr: "s:SD4KeysV"
|
|
},
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "foo()",
|
|
key.usr: "s:SD4KeysV5cake1E3fooyyF",
|
|
key.offset: 751,
|
|
key.length: 10,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>foo</decl.name>()</decl.function.method.instance>"
|
|
}
|
|
]
|
|
}
|
|
]
|