Expand description
§cttt-parser
A parser for the Change This Then That.
§Examples
Basic usage:
let s = "
// @cttt.name(foo)
let x = 1;
// @cttt.change(bar)
// @cttt.name(bar)
let y = 2;
// @cttt.change(foo)
";
println!("{:#?}", cttt_parser::parse(s));
Strict usage:
let s = "
// @cttt.name(foo)
let x = 1;
// @cttt.change(bar)
// @cttt.name(bar)
let y = 2;
// @cttt.change(foo)
";
println!(
"{:#?}",
cttt_parser::parse_strict(s, vec!["name".to_string(), "change".to_string()])
);
Structs§
- Comment
- A Comment with a command and arguments
- Comment
Debug - Debug information for a Comment
- Unknown
Command Error - Error identifying location of unknown command
Enums§
- Rule
- Strict
Parse Error - Error identifying location of unknown command or other parsing error
Statics§
- NAMESPACE
- Namespace for commands
Functions§
- parse
- Parse a string into a vector of Comments.
- parse_
strict - Parse a string into a vector of Comments, and check for unknown commands.