Thrift v1.3.0 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 ::
  %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 ::
  %Thrift.Parser.Models.Include{path: term} |
  %Thrift.Parser.Models.Namespace{name: term, path: term}
t :: %Thrift.Parser.Models.Schema{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}], 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, Thrift.Parser.Types.t, atom}

Functions

new(headers, defs)

Specs

new([header], [definition]) :: t

Constructs a schema with both headers and definitions.