packages feed

thrift-compiler-0.1.0.1: test/fixtures/gen-basic-loc/a.ast

{
    "consts": [
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 9, locStartCol = 7, locEndLine = 9, locEndCol = 8}"
                ],
                "type": {
                    "name": "T"
                }
            },
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 9, locStartCol = 1, locEndLine = 9, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 9, locStartCol = 9, locEndLine = 9, locEndCol = 10}",
            "name": "a",
            "type": {
                "inner_type": {
                    "type": "i64"
                },
                "loc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 13, locEndLine = 7, locEndCol = 14}",
                "name": {
                    "name": "T"
                },
                "type": "typedef"
            },
            "value": {
                "named_constant": {
                    "name": "i64_value",
                    "src": "b"
                }
            },
            "xref": [
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 9, locStartCol = 7, locEndLine = 9, locEndCol = 8}",
                    "rLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 13, locEndLine = 7, locEndCol = 14}"
                },
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 9, locStartCol = 13, locEndLine = 9, locEndCol = 24}",
                    "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 51, locStartCol = 11, locEndLine = 51, locEndCol = 20}"
                }
            ]
        },
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 31, locStartCol = 7, locEndLine = 31, locEndCol = 8}"
                ],
                "type": {
                    "name": "U"
                }
            },
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 31, locStartCol = 1, locEndLine = 31, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 31, locStartCol = 9, locEndLine = 31, locEndCol = 10}",
            "name": "u",
            "type": {
                "loc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 21, locStartCol = 7, locEndLine = 21, locEndCol = 8}",
                "name": {
                    "name": "U"
                },
                "type": "union"
            },
            "value": {
                "literal": {
                    "type": "union",
                    "value": {
                        "field_name": "y",
                        "field_type": {
                            "inner_type": {
                                "type": "string"
                            },
                            "type": "list"
                        },
                        "field_value": {
                            "literal": {
                                "type": "list",
                                "value": [
                                    {
                                        "named_constant": {
                                            "name": "string_value",
                                            "src": "b"
                                        }
                                    }
                                ]
                            }
                        }
                    }
                }
            },
            "xref": [
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 31, locStartCol = 7, locEndLine = 31, locEndCol = 8}",
                    "rLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 21, locStartCol = 7, locEndLine = 21, locEndCol = 8}"
                }
            ]
        },
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 33, locStartCol = 7, locEndLine = 33, locEndCol = 10}"
                ],
                "type": {
                    "name": "b.B"
                }
            },
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 33, locStartCol = 1, locEndLine = 33, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 33, locStartCol = 11, locEndLine = 33, locEndCol = 12}",
            "name": "b",
            "type": {
                "loc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 9, locStartCol = 8, locEndLine = 9, locEndCol = 9}",
                "name": {
                    "name": "B",
                    "src": "b"
                },
                "type": "struct"
            },
            "value": {
                "literal": {
                    "type": "struct",
                    "value": [
                        {
                            "field_name": "a",
                            "field_type": {
                                "type": "i16"
                            },
                            "field_value": {
                                "named_constant": {
                                    "name": "i16_value",
                                    "src": "b"
                                }
                            }
                        },
                        {
                            "field_name": "b",
                            "field_type": {
                                "type": "i32"
                            },
                            "field_value": {
                                "named_constant": {
                                    "name": "i32_value",
                                    "src": "b"
                                }
                            }
                        },
                        {
                            "field_name": "c",
                            "field_type": {
                                "type": "i64"
                            },
                            "field_value": {
                                "named_constant": {
                                    "name": "i64_value",
                                    "src": "b"
                                }
                            }
                        }
                    ]
                }
            },
            "xref": [
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 33, locStartCol = 7, locEndLine = 33, locEndCol = 10}",
                    "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 9, locStartCol = 8, locEndLine = 9, locEndCol = 9}"
                }
            ]
        },
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 35, locStartCol = 7, locEndLine = 35, locEndCol = 10}"
                ],
                "type": {
                    "name": "b.B"
                }
            },
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 35, locStartCol = 1, locEndLine = 35, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 35, locStartCol = 11, locEndLine = 35, locEndCol = 20}",
            "name": "default_d",
            "type": {
                "loc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 9, locStartCol = 8, locEndLine = 9, locEndCol = 9}",
                "name": {
                    "name": "B",
                    "src": "b"
                },
                "type": "struct"
            },
            "value": {
                "literal": {
                    "type": "struct",
                    "value": [
                        {
                            "field_name": "a",
                            "field_type": {
                                "type": "i16"
                            },
                            "field_value": {
                                "default": null
                            }
                        },
                        {
                            "field_name": "b",
                            "field_type": {
                                "type": "i32"
                            },
                            "field_value": {
                                "default": null
                            }
                        },
                        {
                            "field_name": "c",
                            "field_type": {
                                "type": "i64"
                            },
                            "field_value": {
                                "default": null
                            }
                        }
                    ]
                }
            },
            "xref": [
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 35, locStartCol = 7, locEndLine = 35, locEndCol = 10}",
                    "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 9, locStartCol = 8, locEndLine = 9, locEndCol = 9}"
                }
            ]
        },
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 37, locStartCol = 7, locEndLine = 37, locEndCol = 15}"
                ],
                "type": {
                    "name": "b.Number"
                }
            },
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 37, locStartCol = 1, locEndLine = 37, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 37, locStartCol = 16, locEndLine = 37, locEndCol = 20}",
            "name": "zero",
            "type": {
                "loc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 21, locStartCol = 6, locEndLine = 21, locEndCol = 12}",
                "name": {
                    "name": "Number",
                    "src": "b"
                },
                "type": "enum"
            },
            "value": {
                "literal": {
                    "type": "enum",
                    "value": {
                        "name": "Zero",
                        "src": "b"
                    }
                }
            },
            "xref": [
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 37, locStartCol = 7, locEndLine = 37, locEndCol = 15}",
                    "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 21, locStartCol = 6, locEndLine = 21, locEndCol = 12}"
                },
                {
                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 37, locStartCol = 23, locEndLine = 37, locEndCol = 29}",
                    "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 22, locStartCol = 3, locEndLine = 22, locEndCol = 7}"
                }
            ]
        }
    ],
    "enums": [],
    "includes": [
        "test/if/b.thrift"
    ],
    "name": "a",
    "options": {
        "genfiles": null,
        "include_path": ".",
        "out_path": "test/fixtures/gen-basic-loc",
        "path": "test/if/a.thrift",
        "recursive": true
    },
    "path": "test/if/a.thrift",
    "services": [
        {
            "functions": [
                {
                    "args": [
                        {
                            "id": 1,
                            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 40, locStartCol = 29, locEndLine = 40, locEndCol = 30}",
                            "name": "x",
                            "type": {
                                "type": "i32"
                            },
                            "xref": []
                        }
                    ],
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 40, locStartCol = 12, locEndLine = 40, locEndCol = 21}",
                    "name": "getNumber",
                    "oneway": false,
                    "return_type": {
                        "loc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 21, locStartCol = 6, locEndLine = 21, locEndCol = 12}",
                        "name": {
                            "name": "Number",
                            "src": "b"
                        },
                        "type": "enum"
                    },
                    "throws": []
                },
                {
                    "args": [],
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 42, locStartCol = 8, locEndLine = 42, locEndCol = 17}",
                    "name": "doNothing",
                    "oneway": false,
                    "return_type": {
                        "type": "void"
                    },
                    "throws": [
                        {
                            "id": 1,
                            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 42, locStartCol = 33, locEndLine = 42, locEndCol = 35}",
                            "name": "ex",
                            "type": {
                                "loc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 27, locStartCol = 11, locEndLine = 27, locEndCol = 12}",
                                "name": {
                                    "name": "X"
                                },
                                "type": "exception"
                            },
                            "xref": [
                                {
                                    "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 42, locStartCol = 31, locEndLine = 42, locEndCol = 32}",
                                    "rLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 27, locStartCol = 11, locEndLine = 27, locEndCol = 12}"
                                }
                            ]
                        }
                    ]
                }
            ],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 39, locStartCol = 1, locEndLine = 39, locEndCol = 8}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 39, locStartCol = 9, locEndLine = 39, locEndCol = 10}",
            "name": "S"
        },
        {
            "functions": [],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 45, locStartCol = 1, locEndLine = 45, locEndCol = 8}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 45, locStartCol = 9, locEndLine = 45, locEndCol = 22}",
            "name": "ParentService"
        },
        {
            "functions": [
                {
                    "args": [],
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 49, locStartCol = 7, locEndLine = 49, locEndCol = 10}",
                    "name": "foo",
                    "oneway": false,
                    "return_type": {
                        "type": "i32"
                    },
                    "throws": []
                }
            ],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 48, locStartCol = 1, locEndLine = 48, locEndCol = 8}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 48, locStartCol = 9, locEndLine = 48, locEndCol = 21}",
            "name": "ChildService",
            "super": {
                "name": "ParentService"
            }
        }
    ],
    "structs": [
        {
            "fields": [
                {
                    "default_value": {
                        "named_constant": {
                            "name": "a"
                        }
                    },
                    "id": 1,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 12, locStartCol = 8, locEndLine = 12, locEndCol = 9}",
                    "name": "a",
                    "requiredness": "default",
                    "type": {
                        "inner_type": {
                            "type": "i64"
                        },
                        "loc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 13, locEndLine = 7, locEndCol = 14}",
                        "name": {
                            "name": "T"
                        },
                        "type": "typedef"
                    },
                    "xref": [
                        {
                            "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 12, locStartCol = 6, locEndLine = 12, locEndCol = 7}",
                            "rLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 13, locEndLine = 7, locEndCol = 14}"
                        }
                    ]
                },
                {
                    "default_value": {
                        "named_constant": {
                            "name": "bool_value",
                            "src": "b"
                        }
                    },
                    "id": 3,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 13, locStartCol = 11, locEndLine = 13, locEndCol = 12}",
                    "name": "c",
                    "requiredness": "default",
                    "type": {
                        "type": "bool"
                    },
                    "xref": []
                },
                {
                    "id": 4,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 14, locStartCol = 22, locEndLine = 14, locEndCol = 23}",
                    "name": "d",
                    "requiredness": "default",
                    "type": {
                        "inner_type": {
                            "inner_type": {
                                "type": "i32"
                            },
                            "type": "list"
                        },
                        "type": "list"
                    },
                    "xref": []
                },
                {
                    "id": 5,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 15, locStartCol = 23, locEndLine = 15, locEndCol = 24}",
                    "name": "e",
                    "requiredness": "default",
                    "type": {
                        "key_type": {
                            "type": "i32"
                        },
                        "type": "map",
                        "val_type": {
                            "type": "string"
                        }
                    },
                    "xref": []
                },
                {
                    "default_value": {
                        "literal": {
                            "type": "enum",
                            "value": {
                                "name": "Two",
                                "src": "b"
                            }
                        }
                    },
                    "id": 6,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 16, locStartCol = 15, locEndLine = 16, locEndCol = 16}",
                    "name": "f",
                    "requiredness": "default",
                    "type": {
                        "loc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 21, locStartCol = 6, locEndLine = 21, locEndCol = 12}",
                        "name": {
                            "name": "Number",
                            "src": "b"
                        },
                        "type": "enum"
                    },
                    "xref": [
                        {
                            "aLoc": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 16, locStartCol = 6, locEndLine = 16, locEndCol = 14}",
                            "rLoc": "Loc {locFile = \"test/if/b.thrift\", locStartLine = 21, locStartCol = 6, locEndLine = 21, locEndCol = 12}"
                        }
                    ]
                },
                {
                    "id": 7,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 17, locStartCol = 22, locEndLine = 17, locEndCol = 23}",
                    "name": "g",
                    "requiredness": "optional",
                    "type": {
                        "type": "string"
                    },
                    "xref": []
                },
                {
                    "id": 8,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 18, locStartCol = 22, locEndLine = 18, locEndCol = 23}",
                    "name": "h",
                    "requiredness": "required",
                    "type": {
                        "type": "string"
                    },
                    "xref": []
                }
            ],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 11, locStartCol = 1, locEndLine = 11, locEndCol = 7}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 11, locStartCol = 8, locEndLine = 11, locEndCol = 9}",
            "name": "A",
            "struct_type": "STRUCT"
        },
        {
            "fields": [
                {
                    "id": 1,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 28, locStartCol = 13, locEndLine = 28, locEndCol = 19}",
                    "name": "reason",
                    "requiredness": "default",
                    "type": {
                        "type": "string"
                    },
                    "xref": []
                }
            ],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 27, locStartCol = 1, locEndLine = 27, locEndCol = 10}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 27, locStartCol = 11, locEndLine = 27, locEndCol = 12}",
            "name": "X",
            "struct_type": "EXCEPTION"
        }
    ],
    "typedefs": [
        {
            "ann_type": {
                "anns": null,
                "loc": [
                    "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 9, locEndLine = 7, locEndCol = 12}"
                ],
                "type": {
                    "type": "i64"
                }
            },
            "anns": null,
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 1, locEndLine = 7, locEndCol = 8}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 7, locStartCol = 13, locEndLine = 7, locEndCol = 14}",
            "name": "T",
            "newtype": false,
            "type": {
                "type": "i64"
            },
            "xref": []
        }
    ],
    "unions": [
        {
            "fields": [
                {
                    "id": 1,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 22, locStartCol = 11, locEndLine = 22, locEndCol = 12}",
                    "name": "x",
                    "type": {
                        "type": "byte"
                    }
                },
                {
                    "id": 2,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 23, locStartCol = 19, locEndLine = 23, locEndCol = 20}",
                    "name": "y",
                    "type": {
                        "inner_type": {
                            "type": "string"
                        },
                        "type": "list"
                    }
                },
                {
                    "id": 3,
                    "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 24, locStartCol = 15, locEndLine = 24, locEndCol = 16}",
                    "name": "z",
                    "type": {
                        "inner_type": {
                            "type": "i64"
                        },
                        "type": "set"
                    }
                }
            ],
            "loc_keyword": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 21, locStartCol = 1, locEndLine = 21, locEndCol = 6}",
            "loc_name": "Loc {locFile = \"test/if/a.thrift\", locStartLine = 21, locStartCol = 7, locEndLine = 21, locEndCol = 8}",
            "name": "U"
        }
    ]
}