Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
refactor(core): rename `hunspell` module
Elijah Potter4829e0b71aa4
diff --git a/harper-core/src/spell/mod.rs b/harper-core/src/spell/mod.rsindex 1db80ef74..3964bbf41 100644--- a/harper-core/src/spell/mod.rs+++ b/harper-core/src/spell/mod.rs@@ -8,9 +8,9 @@ pub use self::word_id::WordId;mod dictionary;mod fst_dictionary;-pub mod hunspell;mod merged_dictionary;mod mutable_dictionary;+mod rune;mod word_id;mod word_map;diff --git a/harper-core/src/spell/mutable_dictionary.rs b/harper-core/src/spell/mutable_dictionary.rsindex 34e444118..19323a66f 100644--- a/harper-core/src/spell/mutable_dictionary.rs+++ b/harper-core/src/spell/mutable_dictionary.rs@@ -1,6 +1,6 @@use super::{FstDictionary, WordId,- hunspell::{parse_default_attribute_list, parse_default_word_list},+ rune::{parse_default_attribute_list, parse_default_word_list},word_map::{WordMap, WordMapEntry},};use crate::edit_distance::edit_distance_min_alloc;diff --git a/harper-core/src/spell/hunspell/affix_replacement.rs b/harper-core/src/spell/rune/affix_replacement.rssimilarity index 100%rename from harper-core/src/spell/hunspell/affix_replacement.rsrename to harper-core/src/spell/rune/affix_replacement.rsdiff --git a/harper-core/src/spell/hunspell/attribute_list.rs b/harper-core/src/spell/rune/attribute_list.rssimilarity index 100%rename from harper-core/src/spell/hunspell/attribute_list.rsrename to harper-core/src/spell/rune/attribute_list.rsdiff --git a/harper-core/src/spell/hunspell/error.rs b/harper-core/src/spell/rune/error.rssimilarity index 100%rename from harper-core/src/spell/hunspell/error.rsrename to harper-core/src/spell/rune/error.rsdiff --git a/harper-core/src/spell/hunspell/expansion.rs b/harper-core/src/spell/rune/expansion.rssimilarity index 100%rename from harper-core/src/spell/hunspell/expansion.rsrename to harper-core/src/spell/rune/expansion.rsdiff --git a/harper-core/src/spell/hunspell/matcher.rs b/harper-core/src/spell/rune/matcher.rssimilarity index 96%rename from harper-core/src/spell/hunspell/matcher.rsrename to harper-core/src/spell/rune/matcher.rsindex f0574185f..3b707b817 100644--- a/harper-core/src/spell/hunspell/matcher.rs+++ b/harper-core/src/spell/rune/matcher.rs@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};/// A simplified, Regex-like matcher.///-/// See Hunspell documentation on affixes for more information.+/// See the Hunspell documentation on affixes for more information.#[derive(Debug, Clone, Serialize, Deserialize)]pub struct Matcher {/// Position-based operators.@@ -128,8 +128,7 @@ pub enum Error {#[cfg(test)]mod tests {- use super::Matcher;- use crate::spell::hunspell::matcher::Operator;+ use super::{Matcher, Operator};#[test]fn parses_simple() {diff --git a/harper-core/src/spell/hunspell/mod.rs b/harper-core/src/spell/rune/mod.rssimilarity index 99%rename from harper-core/src/spell/hunspell/mod.rsrename to harper-core/src/spell/rune/mod.rsindex 518ce498f..50a0f1eea 100644--- a/harper-core/src/spell/hunspell/mod.rs+++ b/harper-core/src/spell/rune/mod.rs@@ -32,10 +32,10 @@ mod tests {use serde_json::json;use super::super::word_map::WordMap;+ use super::HumanReadableAttributeList;use super::word_list::parse_word_list;use super::{parse_default_attribute_list, parse_default_word_list};use crate::CharStringExt;- use crate::spell::hunspell::attribute_list::HumanReadableAttributeList;pub const TEST_WORD_LIST: &str = "3\nhello\ntry/B\nwork/AB";diff --git a/harper-core/src/spell/hunspell/word_list.rs b/harper-core/src/spell/rune/word_list.rssimilarity index 97%rename from harper-core/src/spell/hunspell/word_list.rsrename to harper-core/src/spell/rune/word_list.rsindex 7d7240f95..ea402a187 100644--- a/harper-core/src/spell/hunspell/word_list.rs+++ b/harper-core/src/spell/rune/word_list.rs@@ -7,7 +7,7 @@ pub struct MarkedWord {pub attributes: Vec<char>,}-/// Parse a Hunspell word list+/// Parse a Rune word list////// Returns [`None`] if the given string is invalid.pub fn parse_word_list(source: &str) -> Result<Vec<MarkedWord>, Error> {