Expand description
§NBCL - Node Based Configuration Language
nbcl is a lightweight, declarative configuration DSL mainly designed for
defining UI components and cloud infrastructure. The syntax is designed to be simple,
and thus follows an HCL-inspired Blocky syntax but with the added benifits of
modularity, scripting capabilities, and simplicity.
§Example
use nbcl::NbclEngine;
fn main() {
let code = r#"
print("Hello, World")
Object "language" {
name = "nbcl"
website = "nbcl-lang.github.io"
playground = "nbcl-lang.github.io/playground"
documnetation = "nbcl-lang.github.io/docs"
}
"#;
let engine = NbclEngine::new();
match engine.evaluate(code) {
Ok(cfg) => println!("Resolved config: {:#?}", cfg),
Err(e) => println!("Error: {}", e)
}
}Modules§
- ast
- AST components used across the crate
- context
- error
- Module responsible for all the error handling in Nbcl
- library
- API’s for registering new Library that can be imported and used
- module_
resolver - Module resolver for handling import statements
Structs§
- Native
FnSchema - Public structure used for registering custom functions.
- Native
Node Schema - Public structure used for registering custom nodes.
- Nbcl
Engine - Nbcl Engine used for parsing and evaluation
Enums§
- Prop
Validation - Defines a host-provided node
- Type
- Possible data types in Nbcl (used for type hints)
- Value
- Possible data types in Nbcl (used to hold value)
Functions§
- Print a message that automatically goes to right buffer.