mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The text for tok::kw_struct, and similar, are always known. Save space by not serializing them.
266 lines
4.8 KiB
JSON
266 lines
4.8 KiB
JSON
[
|
|
{
|
|
"kind": "UnknownDecl",
|
|
"layout": [
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "l_brace"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "identifier",
|
|
"text": "Int"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "identifier",
|
|
"text": "Array"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
{
|
|
"kind": "Space",
|
|
"value": 1
|
|
}
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "oper_binary_spaced",
|
|
"text": "<"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
{
|
|
"kind": "Space",
|
|
"value": 1
|
|
}
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "identifier",
|
|
"text": "Int"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
{
|
|
"kind": "Space",
|
|
"value": 1
|
|
}
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "oper_binary_spaced",
|
|
"text": ">"
|
|
},
|
|
"leadingTrivia": [
|
|
|
|
],
|
|
"trailingTrivia": [
|
|
|
|
],
|
|
"presence": "Present"
|
|
},
|
|
{
|
|
"tokenKind": {
|
|
"kind": "r_brace"
|
|
},
|
|
"leadingTrivia": [
|
|
{
|
|
"kind": "Newline",
|
|
"value": 1
|
|
},
|
|
{
|
|
"kind": "Space",
|
|
"value": 6
|
|
}
|
|
],
|
|
"trailingTrivia": [
|
|
|
|
],
|
|
"presence": "Present"
|
|
}
|
|
],
|
|
"presence": "Present"
|
|
}
|
|
]
|