Thrift v1.3.2 Thrift.Parser.Models.Schema

A Thrift schema.

A program represents a single parsed file in Thrift. Many programs can be compiled together to build a Thrift service.

This is the root datastructure that the parser emits after running.

Summary

Functions

Constructs a schema with both headers and definitions

Types

definition()
definition ::
  %Thrift.Parser.Models.Service{extends: term, functions: term, name: term} |
  %Thrift.Parser.Models.TEnum{name: term, values: term} |
  %Thrift.Parser.Models.Exception{fields: term, name: term} |
  %Thrift.Parser.Models.Union{fields: term, name: term} |
  %Thrift.Parser.Models.Struct{fields: term, name: term} |
  %Thrift.Parser.Models.Constant{name: term, type: term, value: term} |
  typedef
header()
header ::
  %Thrift.Parser.Models.Include{path: term} |
  %Thrift.Parser.Models.Namespace{name: term, path: term}
model()
model() :: header | definition
t()
t() :: %Thrift.Parser.Models.Schema{absolute_path: Path.t, constants: %{optional(String.t) => Thrift.Parser.Literals.t}, enums: %{optional(String.t) => %Thrift.Parser.Models.TEnum{name: term, values: term}}, exceptions: %{optional(String.t) => %Thrift.Parser.Models.Exception{fields: term, name: term}}, includes: [%Thrift.Parser.Models.Include{path: term}], module: String.t, namespaces: %{optional(String.t) => %Thrift.Parser.Models.Namespace{name: term, path: term}}, services: %{optional(String.t) => %Thrift.Parser.Models.Service{extends: term, functions: term, name: term}}, structs: %{optional(String.t) => %Thrift.Parser.Models.Struct{fields: term, name: term}}, thrift_namespace: String.t, typedefs: %{optional(String.t) => Thrift.Parser.Types.t}, unions: %{optional(String.t) => %Thrift.Parser.Models.Union{fields: term, name: term}}}
typedef()
typedef() :: {:typedef, Thrift.Parser.Types.t, atom}

Functions

new(file_absolute_path, headers, defs)
new(Path.t, [header], [definition]) :: t

Constructs a schema with both headers and definitions.