Crate ladfile

Crate ladfile 

Source
Expand description

Parsing definitions for the LAD (Language Agnostic Decleration) file format.

The main ideals behind the format are:

  • Centralization, we want to centralize as much of the “documentation” logic in the building of this format. For example, instead of letting each backend parse argument docstrings from the function docstring, we can do this here, and let the backends concentrate on pure generation.
  • Rust centric, the format describes bindings from the Rust side, so we generate rust centric declarations. These can then freely be converted into whatever representaion necessary.

Structs§

LadArgument
An argument definition used in a LAD file.
LadField
A field definition used in a LAD file.
LadFile
A Language Agnostic Declaration (LAD) file.
LadFunction
A function definition used in a LAD file.
LadFunctionId
A unique identifier for a function in a LAD file. Only unique within the LAD file.
LadFunctionMetadata
Additional data relevant to functions
LadGeneric
A generic type definition used in a LAD file.
LadInstance
A LAD global instance
LadNamedField
A named field definition used in a LAD file.
LadTypeDefinition
A type definition used in a LAD file.
LadTypeId
A unique identifier for a type in a LAD file.
LadTypeMetadata
Metadata either calculated from the type registry or added by plugins
PolymorphicTypeKey
A key for polymorphic types, used to group types by their identifier and arity.

Enums§

LadFieldOrVariableKind
The kind of field or variable/parameter in a LAD file. There is a distinction between the “core” definition/identity of a type and how it’s used in various contexts.
LadFunctionNamespace
A function namespace used in a LAD file.
LadTypeLayout
Description of a type layout in a LAD file.
LadVariant
A variant definition used in a LAD file.
ReflectionPrimitiveKind
A primitive type kind in the LAD file format.

Constants§

EXAMPLE_LADFILE
The included example LAD file for testing purposes.
LAD_VERSION
The current version of the LAD_VERSION format supported by this library. Earlier versions are not guaranteed to be supported.

Traits§

ArgumentVisitor
A visitor pattern for running arbitrary logic on the hierarchy of arguments.
LadFilePlugin
A trait implemented by ladfile post-processors.
LadVisitable
Utility for dispatching visitors on dyn traits

Functions§

default_importance
The default importance value for a type.
parse_lad_file
Parses a json string into a LAD file.
serialize_lad_file
Serializes a LAD file into a json file.