diff --git a/src/parse/english/boolean.rs b/src/parse/english/boolean.rs index a7b2c6c..ef60329 100644 --- a/src/parse/english/boolean.rs +++ b/src/parse/english/boolean.rs @@ -19,11 +19,10 @@ pub fn register(parser: &mut Parser) { language: langtag!(en), result_type: ValueType::Boolean, matcher: Box::new(move |_text: &str| -> Option { - return Some(Match { - location: SourceLocation { start: 0, end: 0 }, - weight: 100, + Some(Match { value: HumanValue::Boolean(true), - }); + weight: 100, + }) }), }); } diff --git a/src/parse/mod.rs b/src/parse/mod.rs index 79d2d81..4357ae0 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -60,16 +60,6 @@ use std::time::{Duration, Instant}; pub mod english; -/// A location within a body of text. -#[derive(Debug)] -pub struct SourceLocation { - /// The starting offset into the text of the match. - pub start: usize, - - /// The ending offset into the text of the match. - pub end: usize, -} - #[allow(missing_docs)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum ValueType { @@ -109,9 +99,6 @@ pub struct Match { /// Should it be an enum with values like 'Likely', 'Unlikely', /// and 'Certain'? pub weight: i32, - - /// Location of the match within the text. - pub location: SourceLocation, } #[allow(missing_docs)]