Skip to content

Commit

Permalink
Merge pull request #191 from snipsco/task/fr-new-spec-dt-enhancement-…
Browse files Browse the repository at this point in the history
…rebase

Task/fr new spec dt
  • Loading branch information
adrienball authored Sep 2, 2019
2 parents 2d28f64 + d39e86b commit 6225659
Show file tree
Hide file tree
Showing 13 changed files with 3,121 additions and 2,294 deletions.
2 changes: 1 addition & 1 deletion grammar/en/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn rule_set() -> ::rustling::RustlingResult<::rustling::RuleSet<rustling_ont
rules_datetime::rules_cycle(&mut b)?;
rules_datetime::rules_datetime(&mut b)?;
rules_datetime::rules_datetime_with_duration(&mut b)?;
rules_datetime::rules_datetime_with_nth_cycle(&mut b)?;
rules_datetime::rules_datetime_with_cycle(&mut b)?;
rules_celebrations::rules_celebration(&mut b)?;
rules_duration::rules_duration(&mut b)?;
Ok(b.build())
Expand Down
3 changes: 2 additions & 1 deletion grammar/en/src/rules_datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,8 @@ pub fn rules_datetime_with_duration(b: &mut RuleSetBuilder<Dimension>) -> Rustli

}

pub fn rules_datetime_with_nth_cycle(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {
// FIXME: rename "rules_datetime_with_cycle"
pub fn rules_datetime_with_cycle(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {

b.rule_2("this <cycle>",
b.reg(r#"this|current|coming"#)?,
Expand Down
23 changes: 15 additions & 8 deletions grammar/fr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ extern crate rustling;
extern crate rustling_ontology_values;
extern crate rustling_ontology_moment;

pub mod rules;
mod rules_datetime;
mod rules_celebrations;
mod rules_duration;
mod rules_number;
mod rules_amount;
pub mod training;

use rustling_ontology_values::DimensionKind::*;
Expand All @@ -12,13 +16,16 @@ pub fn rule_set() -> ::rustling::RustlingResult<::rustling::RuleSet<rustling_ont
let mut b = ::rustling::RuleSetBuilder::new(
::rustling::BoundariesChecker::detailed(),
::rustling::BoundariesChecker::separated_alphanumeric_word());
rules::rules_numbers(&mut b)?;
rules::rules_datetime(&mut b)?;
rules::rules_cycle(&mut b)?;
rules::rules_duration(&mut b)?;
rules::rules_temperature(&mut b)?;
rules::rules_finance(&mut b)?;
rules::rules_percentage(&mut b)?;
rules_number::rules_numbers(&mut b)?;
rules_amount::rules_temperature(&mut b)?;
rules_amount::rules_finance(&mut b)?;
rules_amount::rules_percentage(&mut b)?;
rules_datetime::rules_cycle(&mut b)?;
rules_datetime::rules_datetime(&mut b)?;
rules_datetime::rules_datetime_with_duration(&mut b)?;
rules_datetime::rules_datetime_with_cycle(&mut b)?;
rules_celebrations::rules_celebration(&mut b)?;
rules_duration::rules_duration(&mut b)?;
Ok(b.build())
}

Expand Down
Loading

0 comments on commit 6225659

Please sign in to comment.