mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Annotate tuple types and nested function types
Move the type callbacks into the respective type/typerepr printers so taht we get these callbacks even when we print the type directly, or in a nested fashion. Also make the returntype more explicit than just "inside a function type", since visiting the function type currently visits the input argument tuple (which is different than e.g. the function *decl* printing, which walks the parameter list explicitly). rdar://problem/24292226
This commit is contained in:
@@ -3622,7 +3622,7 @@ var FooSubUnnamedEnumeratorA1: Int { get }
|
||||
key.usr: "c:@F@fooFuncWithBlock",
|
||||
key.offset: 1495,
|
||||
key.length: 49,
|
||||
key.fully_annotated_decl: "<decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooFuncWithBlock</decl.name>(<decl.var.parameter><decl.var.parameter.name>blk</decl.var.parameter.name>: <decl.var.parameter.type>((<ref.struct usr=\"s:Sf\">Float</ref.struct>) -> <ref.struct usr=\"s:Vs5Int32\">Int32</ref.struct>)!</decl.var.parameter.type></decl.var.parameter>)</decl.function.free>",
|
||||
key.fully_annotated_decl: "<decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooFuncWithBlock</decl.name>(<decl.var.parameter><decl.var.parameter.name>blk</decl.var.parameter.name>: <decl.var.parameter.type>((<ref.struct usr=\"s:Sf\">Float</ref.struct>) -> <decl.function.returntype><ref.struct usr=\"s:Vs5Int32\">Int32</ref.struct></decl.function.returntype>)!</decl.var.parameter.type></decl.var.parameter>)</decl.function.free>",
|
||||
key.entities: [
|
||||
{
|
||||
key.kind: source.lang.swift.decl.var.local,
|
||||
@@ -3639,7 +3639,7 @@ var FooSubUnnamedEnumeratorA1: Int { get }
|
||||
key.usr: "c:@F@fooFuncWithFunctionPointer",
|
||||
key.offset: 1545,
|
||||
key.length: 60,
|
||||
key.fully_annotated_decl: "<decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooFuncWithFunctionPointer</decl.name>(<decl.var.parameter><decl.var.parameter.name>fptr</decl.var.parameter.name>: <decl.var.parameter.type>((<ref.struct usr=\"s:Sf\">Float</ref.struct>) -> <ref.struct usr=\"s:Vs5Int32\">Int32</ref.struct>)!</decl.var.parameter.type></decl.var.parameter>)</decl.function.free>",
|
||||
key.fully_annotated_decl: "<decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooFuncWithFunctionPointer</decl.name>(<decl.var.parameter><decl.var.parameter.name>fptr</decl.var.parameter.name>: <decl.var.parameter.type>((<ref.struct usr=\"s:Sf\">Float</ref.struct>) -> <decl.function.returntype><ref.struct usr=\"s:Vs5Int32\">Int32</ref.struct></decl.function.returntype>)!</decl.var.parameter.type></decl.var.parameter>)</decl.function.free>",
|
||||
key.entities: [
|
||||
{
|
||||
key.kind: source.lang.swift.decl.var.local,
|
||||
|
||||
Reference in New Issue
Block a user