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.
- LadFunction
Id - A unique identifier for a function in a LAD file. Only unique within the LAD file.
- LadFunction
Metadata - Additional data relevant to functions
- LadGeneric
- A generic type definition used in a LAD file.
- LadInstance
- A LAD global instance
- LadNamed
Field - A named field definition used in a LAD file.
- LadType
Definition - A type definition used in a LAD file.
- LadType
Id - A unique identifier for a type in a LAD file.
- LadType
Metadata - Metadata either calculated from the type registry or added by plugins
- Polymorphic
Type Key - A key for polymorphic types, used to group types by their identifier and arity.
Enums§
- LadField
OrVariable Kind - 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.
- LadFunction
Namespace - A function namespace used in a LAD file.
- LadType
Layout - Description of a type layout in a LAD file.
- LadVariant
- A variant definition used in a LAD file.
- Reflection
Primitive Kind - 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§
- Argument
Visitor - A visitor pattern for running arbitrary logic on the hierarchy of arguments.
- LadFile
Plugin - 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.