Expand description
Parser for Telegram’s Type Language (TL) schema files.
This crate converts raw .tl text into a structured Definition AST
which can then be used by code-generators (see layer-tl-gen).
§Quick start
use layer_tl_parser::parse_tl_file;
let src = "user#12345 id:long name:string = User;";
for def in parse_tl_file(src) {
println!("{:#?}", def.unwrap());
}Modules§
- errors
- Parse error types for TL schema parsing.
- tl
- Rust types representing the Abstract Syntax Tree of a TL definition.
Functions§
- parse_
tl_ file - Parses a complete TL schema file, yielding
Definitions one by one.