Skip to content

Commit

Permalink
#18 transformation and inlinement order bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliah-Lakhin committed Jul 6, 2024
1 parent 771b108 commit fb02983
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions work/crates/derive/src/token/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ impl TryFrom<DeriveInput> for TokenInput {
));
}

regex.transform(&TransformConfig::default());
regex.inline(&inline_map, &variant_map)?;
regex.transform(&TransformConfig::default());

let _ = inline_map.insert(name, regex);
}
Expand Down Expand Up @@ -278,8 +278,8 @@ impl TryFrom<DeriveInput> for TokenInput {

if let Some((_, rule)) = &mut variant.rule {
parsable += 1;
rule.transform(&TransformConfig::default());
rule.inline(&inline_map, &variant_map)?;
rule.transform(&TransformConfig::default());
alphabet.append(rule.alphabet());
}
}
Expand Down
2 changes: 1 addition & 1 deletion work/crates/derive/src/token/regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl RegexImpl for Regex {
match self {
Self::Operand(Operand::Unresolved(_)) => system_panic!("Unresolved operand."),

Self::Operand(Operand::Dump(_, inner)) => inner.transform(config),
Self::Operand(Operand::Dump(_, inner)) => inner.transform(&TransformConfig::default()),

Self::Operand(Operand::Transform(feature, inner)) => {
let mut inner = expect_some!(take(inner), "Empty transformation.",);
Expand Down

0 comments on commit fb02983

Please sign in to comment.