mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The code goes into its own sub-tree under 'tools' but tests go under 'test', so that running 'check-swift' will also run all the SourceKit tests. SourceKit is disabled on non-darwin platforms.
104 lines
2.8 KiB
Plaintext
104 lines
2.8 KiB
Plaintext
{
|
|
key.offset: 0,
|
|
key.length: 70,
|
|
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.extension,
|
|
key.name: "OuterCls",
|
|
key.offset: 0,
|
|
key.length: 43,
|
|
key.nameoffset: 10,
|
|
key.namelength: 8,
|
|
key.bodyoffset: 20,
|
|
key.bodylength: 22,
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.accessibility: source.lang.swift.accessibility.internal,
|
|
key.name: "InnerCls1",
|
|
key.offset: 23,
|
|
key.length: 18,
|
|
key.nameoffset: 29,
|
|
key.namelength: 9,
|
|
key.bodyoffset: 40,
|
|
key.bodylength: 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.stmt.brace,
|
|
key.offset: 45,
|
|
key.length: 24,
|
|
key.nameoffset: 0,
|
|
key.namelength: 0,
|
|
key.bodyoffset: 46,
|
|
key.bodylength: 22,
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.accessibility: source.lang.swift.accessibility.private,
|
|
key.name: "MyCoolClass",
|
|
key.offset: 47,
|
|
key.length: 22,
|
|
key.nameoffset: 53,
|
|
key.namelength: 11,
|
|
key.bodyoffset: 66,
|
|
key.bodylength: 2
|
|
}
|
|
]
|
|
}
|
|
],
|
|
key.diagnostics: [
|
|
{
|
|
key.line: 5,
|
|
key.column: 1,
|
|
key.filepath: invalid.swift,
|
|
key.severity: source.diagnostic.severity.error,
|
|
key.description: "braced block of statements is an unused closure",
|
|
key.diagnostic_stage: source.diagnostic.stage.swift.parse
|
|
},
|
|
{
|
|
key.line: 5,
|
|
key.column: 1,
|
|
key.filepath: invalid.swift,
|
|
key.severity: source.diagnostic.severity.error,
|
|
key.description: "statement cannot begin with a closure expression",
|
|
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
|
|
key.diagnostics: [
|
|
{
|
|
key.line: 5,
|
|
key.column: 1,
|
|
key.filepath: invalid.swift,
|
|
key.severity: source.diagnostic.severity.note,
|
|
key.description: "explicitly discard the result of the closure by assigning to '_'",
|
|
key.fixits: [
|
|
{
|
|
key.offset: 45,
|
|
key.length: 0,
|
|
key.sourcetext: "_ = "
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.line: 9,
|
|
key.column: 1,
|
|
key.filepath: invalid.swift,
|
|
key.severity: source.diagnostic.severity.error,
|
|
key.description: "expected '}' at end of closure",
|
|
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
|
|
key.diagnostics: [
|
|
{
|
|
key.line: 5,
|
|
key.column: 1,
|
|
key.filepath: invalid.swift,
|
|
key.severity: source.diagnostic.severity.note,
|
|
key.description: "to match this opening '{'"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|