Allow using fields in inlined rules

This commit is contained in:
Max Brunsfeld 2019-02-08 17:12:08 -08:00
parent eb1e7af5ec
commit b7e38ccc96

View file

@ -114,6 +114,11 @@ impl InlinedProductionMapBuilder {
inserted_step.alias = Some(alias.clone());
}
}
if let Some(field_name) = removed_step.field_name {
for inserted_step in inserted_steps.iter_mut() {
inserted_step.field_name = Some(field_name.clone());
}
}
if let Some(last_inserted_step) = inserted_steps.last_mut() {
if last_inserted_step.precedence == 0 {
last_inserted_step.precedence = removed_step.precedence;