Crate barkml

Crate barkml 

Source
Expand description

BarkML - A declarative configuration language

BarkML is a declarative configuration format inspired by TOML, HCL, and other configuration languages. It was created initially to be used with operational tools and generative tooling. The language defaults to UTF-8 parsing and supports self-referential macro replacements.

§Features

  • Declarative configuration syntax
  • Self-referential macro replacements
  • UTF-8 support by default
  • Type-safe value handling
  • Comprehensive error reporting

§Examples

use barkml::from_str;

let config = r#"
versioning = "1.0.0"
[database]
host = "localhost"
port = 5432
"#;

let statement = from_str(config).expect("Failed to parse BarkML");

Modules§

de
Serde deserialization support for BarkML AST nodes.
ser
Serde serialization support for BarkML AST nodes.
utils
Utility functions for working with BarkML files and paths

Structs§

LoadStats
Statistics about the loading process
LoaderConfig
Configuration options for loaders
Location
Represents a location in the source code
Metadata
Stores the metadata associated with a value or statement
Parser
Scope
Scope is used to resolve macros and manage symbol references
StandardLoader
Standard loader for BarkML files with enhanced capabilities
StandardLoaderBuilder
Builder for StandardLoader with fluent interface
Statement
Represents top-level statements and groupings in the BarkML language
Value
Represents an individual value in the BarkML language

Enums§

Data
Stores the actual in-memory data for a value in BarkML
Error
Comprehensive error type for all BarkML operations.
HashableFloat
Integer
Stores the integer with precision retained
NodeType
Represents the type of a node in the AST
StatementData
Contains the actual set of data for a statement
StatementType
Represents the type of a statement in the BarkML language
Token
Represents the allowed tokens in a barkml file
TypeCategory
Categories for grouping related types
ValueType
Defines the type of a given value
Walk
Enhanced walker for navigating and extracting data from BarkML statements and values

Traits§

Loader
LoaderInterface defines the shared interface for structs that can read and load BarkML files.

Functions§

from_str
Parses a BarkML string and returns the root statement.