flatbuffers-0.1.0.0: Haskell implementation of the FlatBuffers protocol.

Safe HaskellNone
LanguageHaskell2010

FlatBuffers.Internal.Compiler.SemanticAnalysis

Synopsis

Documentation

data ValidationState Source #

Constructors

ValidationState 

Fields

modifyContext :: ValidationCtx m => (Ident -> Ident) -> m a -> m a Source #

data SymbolTable enum struct table union Source #

Constructors

SymbolTable 

Fields

Instances
(Eq enum, Eq struct, Eq table, Eq union) => Eq (SymbolTable enum struct table union) Source # 
Instance details

Defined in FlatBuffers.Internal.Compiler.SemanticAnalysis

Methods

(==) :: SymbolTable enum struct table union -> SymbolTable enum struct table union -> Bool #

(/=) :: SymbolTable enum struct table union -> SymbolTable enum struct table union -> Bool #

(Show enum, Show struct, Show table, Show union) => Show (SymbolTable enum struct table union) Source # 
Instance details

Defined in FlatBuffers.Internal.Compiler.SemanticAnalysis

Methods

showsPrec :: Int -> SymbolTable enum struct table union -> ShowS #

show :: SymbolTable enum struct table union -> String #

showList :: [SymbolTable enum struct table union] -> ShowS #

Semigroup (SymbolTable e s t u) Source # 
Instance details

Defined in FlatBuffers.Internal.Compiler.SemanticAnalysis

Methods

(<>) :: SymbolTable e s t u -> SymbolTable e s t u -> SymbolTable e s t u #

sconcat :: NonEmpty (SymbolTable e s t u) -> SymbolTable e s t u #

stimes :: Integral b => b -> SymbolTable e s t u -> SymbolTable e s t u #

Monoid (SymbolTable e s t u) Source # 
Instance details

Defined in FlatBuffers.Internal.Compiler.SemanticAnalysis

Methods

mempty :: SymbolTable e s t u #

mappend :: SymbolTable e s t u -> SymbolTable e s t u -> SymbolTable e s t u #

mconcat :: [SymbolTable e s t u] -> SymbolTable e s t u #

createSymbolTables :: FileTree Schema -> FileTree Stage1 Source #

Takes a collection of schemas, and pairs each type declaration with its corresponding namespace

updateRootTable :: forall m. ValidationCtx m => Schema -> FileTree ValidDecls -> m (FileTree ValidDecls) Source #

Finds the root table (if any) and sets the tableIsRoot flag accordingly. We only care about root_type declarations in the root schema. Imported schemas are not scanned for root_types. The root type declaration can point to a table in any schema (root or imported).

data Match enum struct table union Source #

Constructors

MatchE !(Namespace, enum) 
MatchS !(Namespace, struct) 
MatchT !(Namespace, table) 
MatchU !(Namespace, union) 

findDecl :: ValidationCtx m => (HasIdent e, HasIdent s, HasIdent t, HasIdent u) => Namespace -> FileTree (SymbolTable e s t u) -> TypeRef -> m (Match e s t u) Source #

Looks for a type reference in a set of type declarations. If none is found, the list of namespaces in which the type reference was searched for is returned.

parentNamespaces :: Namespace -> NonEmpty Namespace Source #

Returns a list of all the namespaces "between" the current namespace and the root namespace, in that order. See: https://github.com/google/flatbuffers/issues/5234#issuecomment-471680403

parentNamespaces "A.B.C" == ["A.B.C", "A.B", "A", ""]

enumSize :: EnumType -> Word8 Source #

The size of an enum is either 1, 2, 4 or 8 bytes, so its size fits in a Word8