{ "kind": "SourceFile", "layout": [ { "kind": "CodeBlockItemList", "layout": [ { "kind": "CodeBlockItem", "layout": [ { "kind": "StructDecl", "layout": [ null, null, { "tokenKind": { "kind": "kw_struct" }, "leadingTrivia": [ { "kind": "LineComment", "value": "\/\/ RUN: %swift-syntax-test -input-source-filename %s -serialize-raw-tree > %t" }, { "kind": "Newline", "value": 1 }, { "kind": "LineComment", "value": "\/\/ RUN: diff %t %S\/Inputs\/serialize_struct_decl.json" }, { "kind": "Newline", "value": 2 } ], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "tokenKind": { "kind": "identifier", "text": "Foo" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, null, null, null, { "kind": "MemberDeclBlock", "layout": [ { "tokenKind": { "kind": "l_brace" }, "leadingTrivia": [], "trailingTrivia": [], "presence": "Present" }, { "kind": "DeclList", "layout": [ { "kind": "VariableDecl", "layout": [ null, null, { "tokenKind": { "kind": "kw_let" }, "leadingTrivia": [ { "kind": "Newline", "value": 1 }, { "kind": "Space", "value": 2 } ], "trailingTrivia": [ { "kind": "Space", "value": 3 } ], "presence": "Present" }, { "kind": "PatternBindingList", "layout": [ { "kind": "PatternBinding", "layout": [ { "kind": "IdentifierPattern", "layout": [ { "tokenKind": { "kind": "identifier", "text": "bar" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" } ], "presence": "Present" }, { "kind": "TypeAnnotation", "layout": [ { "tokenKind": { "kind": "colon" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "kind": "SimpleTypeIdentifier", "layout": [ { "tokenKind": { "kind": "identifier", "text": "Int" }, "leadingTrivia": [], "trailingTrivia": [], "presence": "Present" }, null ], "presence": "Present" } ], "presence": "Present" }, null, null, null ], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" }, { "kind": "VariableDecl", "layout": [ null, null, { "tokenKind": { "kind": "kw_let" }, "leadingTrivia": [ { "kind": "Newline", "value": 2 }, { "kind": "Space", "value": 2 } ], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "kind": "PatternBindingList", "layout": [ { "kind": "PatternBinding", "layout": [ { "kind": "IdentifierPattern", "layout": [ { "tokenKind": { "kind": "identifier", "text": "baz" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" } ], "presence": "Present" }, { "kind": "TypeAnnotation", "layout": [ { "tokenKind": { "kind": "colon" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "kind": "SimpleTypeIdentifier", "layout": [ { "tokenKind": { "kind": "identifier", "text": "Array" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "kind": "GenericArgumentClause", "layout": [ { "tokenKind": { "kind": "l_angle" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, { "kind": "GenericArgumentList", "layout": [ { "kind": "GenericArgument", "layout": [ { "kind": "SimpleTypeIdentifier", "layout": [ { "tokenKind": { "kind": "identifier", "text": "Int" }, "leadingTrivia": [], "trailingTrivia": [ { "kind": "Space", "value": 1 } ], "presence": "Present" }, null ], "presence": "Present" }, null ], "presence": "Present" } ], "presence": "Present" }, { "tokenKind": { "kind": "r_angle" }, "leadingTrivia": [], "trailingTrivia": [], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" }, null, null, null ], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" }, { "tokenKind": { "kind": "r_brace" }, "leadingTrivia": [ { "kind": "Newline", "value": 1 }, { "kind": "Space", "value": 6 } ], "trailingTrivia": [], "presence": "Present" } ], "presence": "Present" } ], "presence": "Present" }, null ], "presence": "Present" } ], "presence": "Present" }, { "tokenKind": { "kind": "eof" }, "leadingTrivia": [ { "kind": "Newline", "value": 1 } ], "trailingTrivia": [], "presence": "Present" } ], "presence": "Present" }