blob: d43cfb016435f261fb8abaf827921e7c058ee00b [file] [log] [blame]
{
"kind": "SourceFile",
"layout": [
{
"kind": "DeclList",
"layout": [
{
"kind": "TopLevelCodeDecl",
"layout": [
{
"kind": "StmtList",
"layout": [
{
"kind": "DeclarationStmt",
"layout": [
{
"kind": "StructDecl",
"layout": [
{
"kind": "AttributeList",
"layout": [
],
"presence": "Missing"
},
{
"kind": "DeclModifier",
"layout": [
],
"presence": "Missing"
},
{
"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"
},
{
"kind": "GenericParameterClause",
"layout": [
],
"presence": "Missing"
},
{
"kind": "TypeInheritanceClause",
"layout": [
],
"presence": "Missing"
},
{
"kind": "GenericWhereClause",
"layout": [
],
"presence": "Missing"
},
{
"kind": "MemberDeclBlock",
"layout": [
{
"tokenKind": {
"kind": "l_brace"
},
"leadingTrivia": [
],
"trailingTrivia": [
],
"presence": "Present"
},
{
"kind": "DeclList",
"layout": [
{
"kind": "UnknownDecl",
"layout": [
{
"tokenKind": {
"kind": "kw_let"
},
"leadingTrivia": [
{
"kind": "Newline",
"value": 1
},
{
"kind": "Space",
"value": 2
}
],
"trailingTrivia": [
{
"kind": "Space",
"value": 3
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "identifier",
"text": "bar"
},
"leadingTrivia": [
],
"trailingTrivia": [
{
"kind": "Space",
"value": 1
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "colon"
},
"leadingTrivia": [
],
"trailingTrivia": [
{
"kind": "Space",
"value": 1
}
],
"presence": "Present"
},
{
"kind": "SimpleTypeIdentifier",
"layout": [
{
"tokenKind": {
"kind": "identifier",
"text": "Int"
},
"leadingTrivia": [
],
"trailingTrivia": [
],
"presence": "Present"
},
{
"kind": "GenericArgumentClause",
"layout": [
],
"presence": "Missing"
}
],
"presence": "Present"
}
],
"presence": "Present"
},
{
"kind": "UnknownDecl",
"layout": [
{
"tokenKind": {
"kind": "kw_let"
},
"leadingTrivia": [
{
"kind": "Newline",
"value": 2
},
{
"kind": "Space",
"value": 2
}
],
"trailingTrivia": [
{
"kind": "Space",
"value": 1
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "identifier",
"text": "baz"
},
"leadingTrivia": [
],
"trailingTrivia": [
{
"kind": "Space",
"value": 1
}
],
"presence": "Present"
},
{
"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"
},
{
"kind": "GenericArgumentClause",
"layout": [
],
"presence": "Missing"
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "comma"
},
"leadingTrivia": [
],
"trailingTrivia": [
],
"presence": "Missing"
}
],
"presence": "Present"
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "r_angle"
},
"leadingTrivia": [
],
"trailingTrivia": [
],
"presence": "Present"
}
],
"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"
},
{
"tokenKind": {
"kind": "semi"
},
"leadingTrivia": [
],
"trailingTrivia": [
],
"presence": "Missing"
}
],
"presence": "Present"
}
],
"presence": "Present"
}
],
"presence": "Present"
}
],
"presence": "Present"
},
{
"tokenKind": {
"kind": "eof"
},
"leadingTrivia": [
{
"kind": "Newline",
"value": 1
}
],
"trailingTrivia": [
],
"presence": "Present"
}
],
"presence": "Present"
}