pub struct FillerRule {
pub word: &'static str,
pub positions: &'static [Position],
pub not_if_prev: &'static [&'static str],
pub not_if_next: &'static [&'static str],
pub compound_prev: &'static [&'static str],
pub compound_next: &'static [&'static str],
pub compound_requires_boundary_before: bool,
pub requires_prev: &'static [&'static str],
pub requires_after_comma: bool,
pub keep_terminal: bool,
}Expand description
Regra declarativa de muleta. Tudo o que o removedor precisa saber sobre uma palavra está aqui.
Fields§
§word: &'static strForma lowercase da muleta.
positions: &'static [Position]Posições aceitas.
not_if_prev: &'static [&'static str]Guardas: se o token anterior for um destes, NÃO remove.
not_if_next: &'static [&'static str]Guardas: se o próximo for um destes, NÃO remove.
compound_prev: &'static [&'static str]Remove também quando o anterior é um destes (“assim” após “tipo”), sem exigir fronteira — as guardas continuam valendo.
compound_next: &'static [&'static str]Remove quando o próximo é um destes (“tipo” formando “tipo assim”). As guardas continuam valendo.
compound_requires_boundary_before: boolExige fronteira ANTES para casar compound_next (“né não” só cai
após vírgula/borda; “é tipo assim” cai no meio da frase).
requires_prev: &'static [&'static str]OBRIGA o token anterior a ser um destes (“não” só após “né”).
requires_after_comma: bool“olha”: exige vírgula logo depois.
keep_terminal: boolPontuação terminal (‘.’/‘!’/‘?’) pertence à FRASE: “disso né?” vira “Disso?” (a pergunta sobrevive). False = tag declarativa (“sabe?”, “tá?”): a pontuação é da tag e a frase ganha ponto final. (Correção do bug 1 da v1 — regra por regra, não receita cega.)
Trait Implementations§
Source§impl Clone for FillerRule
impl Clone for FillerRule
Source§fn clone(&self) -> FillerRule
fn clone(&self) -> FillerRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more