Expand description
This crate is used to create engines based on Kismesis.
§Basic Use
First, we create the engine and register some files.
use kismesis::Kismesis;
let mut engine = Kismesis::new(); // Engine must be mutable
let mut my_parsed_file = engine.register_str("<p: this is a kismesis string!>").unwrap();
This will give us a ParsedFile
that we can then use during templating. Templates can only be used through a KisTemplateId
because they might have other templates and even be self referential. The engine provides register_template
to store the file and obtain the ID.
// This obtains a ParsedFile.
let my_template = engine.register_str("# Test\n<content!>").unwrap();
// This registers that file as a template, returning a KisTemplateId
let my_template = engine.register_template(my_template);
my_parsed_file.template = Some(my_template);
println!("{}", html::compile(&my_parsed_file, &engine).unwrap());
Modules§
- errors
- Data structures representing every possible failure during Kismesis’ runtime.
- html
- Module containing everything that turns kismesis into html.
- lexer
- Module regarding
Token
s and tokenization. - options
- Kismesis configuration data structure
- parser
- Module containing all of kismesis’ parsing utilities.
- plugins
Structs§
- FileRef
- The tokens and path (if any) of a file.
- KisToken
Id - ID newtype for kismesis tokens
- Kismesis
- A struct which contains Kismesis data that might be self-referential, such as templates (which might be recursuve)
Enums§
- KisTemplate
Id - IDs for kismesis templates
- Kismesis
Error