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.
LadBMSPrimitiveType
A BMS primitive definition
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.
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.
LadType
A type definition used in a LAD file.
LadTypeId
A unique identifier for a type in a LAD file.

Enums§

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

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.

Functions§

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