[−][src]Crate kwp
An input parser for positive and negative keywords input (e.g: +foo,-bar,+baz)
Getting Started
use kwp::{Parser, Prefixes}; use std::env; fn main() { let input = env::args_os() .nth(1) .expect("No input provided.") .into_string() .unwrap(); let parser = Parser::new( &input, Prefixes::default() ); let (pos, neg, _) = parser.parse(); println!( "Input: {}\nPositive: {:#?}\nNegative: {:#?}", input, pos, neg ); }
Structs
Parser | Represents the main parser |
Prefixes | Represents the positive and negative keyword prefixes for parsing. |
Type Definitions
Parsed | Shorthand for parsed data from the parse function. |
ParsedResponse | The response type from the parse function - basically a 3-tuple of |