馃 The Definitive Gemini Protocol Toolkit
gemini
gemini-protocol
gemtext
parser
zero-dependency
toolkit
ast
converter
html
markdown
cli
networking
1//! This example demonstrates Germ's capabilities for parsing Gemtext into an
2//! abstract syntax tree.
3
4fn main() {
5 // Parse `EXAMPLE_GEMTEXT` into an abstract syntax tree
6 let ast = germ::ast::Ast::from_string(germ::EXAMPLE_GEMTEXT);
7 // Get the nodes of the abstract syntax tree
8 let ast_nodes = ast.inner();
9
10 // Print the abstract syntax tree nodes, one-by-one
11 for node in ast_nodes {
12 println!("{:?}", node);
13 }
14}