packages feed

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

{
    "consts": [
        {
            "name": "MyConst",
            "type": {
                "key_type": {
                    "type": "string"
                },
                "type": "map",
                "val_type": {
                    "type": "string"
                }
            },
            "value": {
                "literal": {
                    "type": "map",
                    "value": [
                        {
                            "key": {
                                "literal": {
                                    "type": "string",
                                    "value": "ENUMERATOR"
                                }
                            },
                            "val": {
                                "literal": {
                                    "type": "string",
                                    "value": "value"
                                }
                            }
                        }
                    ]
                }
            }
        }
    ],
    "enums": [
        {
            "constants": [
                {
                    "name": "UNKNOWN",
                    "value": 0
                },
                {
                    "name": "FIRST",
                    "value": 1
                }
            ],
            "flavour": "sum_type",
            "name": "MyEnum"
        }
    ],
    "includes": [],
    "name": "c",
    "options": {
        "genfiles": null,
        "include_path": ".",
        "out_path": "test/fixtures/gen-basic",
        "path": "test/if/c.thrift",
        "recursive": true
    },
    "path": "test/if/c.thrift",
    "services": [
        {
            "functions": [
                {
                    "args": [
                        {
                            "id": 2,
                            "name": "param",
                            "type": {
                                "inner_type": {
                                    "type": "string"
                                },
                                "name": {
                                    "name": "annotated_string"
                                },
                                "type": "typedef"
                            }
                        }
                    ],
                    "name": "my_function",
                    "oneway": false,
                    "return_type": {
                        "type": "i64"
                    },
                    "throws": []
                }
            ],
            "name": "MyService"
        }
    ],
    "structs": [
        {
            "fields": [
                {
                    "id": 1,
                    "name": "name",
                    "requiredness": "default",
                    "type": {
                        "type": "string"
                    }
                },
                {
                    "default_value": {
                        "literal": {
                            "string": "1",
                            "type": "i64",
                            "value": 1
                        }
                    },
                    "id": 2,
                    "name": "count",
                    "requiredness": "default",
                    "type": {
                        "type": "i64"
                    }
                }
            ],
            "name": "FirstAnnotation",
            "struct_type": "STRUCT"
        },
        {
            "fields": [
                {
                    "default_value": {
                        "literal": {
                            "string": "0",
                            "type": "i64",
                            "value": 0
                        }
                    },
                    "id": 2,
                    "name": "total",
                    "requiredness": "default",
                    "type": {
                        "type": "i64"
                    }
                },
                {
                    "id": 3,
                    "name": "recurse",
                    "requiredness": "default",
                    "type": {
                        "name": {
                            "name": "SecondAnnotation"
                        },
                        "type": "struct"
                    }
                },
                {
                    "id": 4,
                    "name": "either",
                    "requiredness": "default",
                    "type": {
                        "name": {
                            "name": "UnionAnnotation"
                        },
                        "type": "union"
                    }
                }
            ],
            "name": "SecondAnnotation",
            "struct_type": "STRUCT"
        },
        {
            "fields": [
                {
                    "id": 5,
                    "name": "tag",
                    "requiredness": "default",
                    "type": {
                        "inner_type": {
                            "type": "string"
                        },
                        "name": {
                            "name": "annotated_string"
                        },
                        "type": "typedef"
                    }
                }
            ],
            "name": "MyStruct",
            "struct_type": "STRUCT"
        },
        {
            "fields": [
                {
                    "id": 1,
                    "name": "message",
                    "requiredness": "default",
                    "type": {
                        "type": "string"
                    }
                }
            ],
            "name": "MyException",
            "struct_type": "EXCEPTION"
        }
    ],
    "typedefs": [
        {
            "name": "annotated_string",
            "newtype": false,
            "type": {
                "type": "string"
            }
        }
    ],
    "unions": [
        {
            "fields": [
                {
                    "id": 2,
                    "name": "left",
                    "type": {
                        "type": "i64"
                    }
                },
                {
                    "id": 3,
                    "name": "right",
                    "type": {
                        "type": "i64"
                    }
                }
            ],
            "name": "UnionAnnotation"
        },
        {
            "fields": [
                {
                    "id": 1,
                    "name": "int_value",
                    "type": {
                        "type": "i64"
                    }
                },
                {
                    "id": 2,
                    "name": "string_value",
                    "type": {
                        "type": "string"
                    }
                }
            ],
            "name": "MyUnion"
        }
    ]
}