Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed TODO about removed box syntax #854

Merged
merged 1 commit into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions meta/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ impl Expr {
let expr = f(expr);

match expr {
// TODO: Use box syntax when it gets stabilized.
Expr::PosPred(expr) => {
let mapped = Box::new(map_internal(*expr, f));
Expr::PosPred(mapped)
Expand Down Expand Up @@ -189,7 +188,6 @@ impl Expr {
{
let mapped = match expr {
Expr::PosPred(expr) => {
// TODO: Use box syntax when it gets stabilized.
let mapped = Box::new(map_internal(*expr, f));
Expr::PosPred(mapped)
}
Expand Down
1 change: 0 additions & 1 deletion meta/src/optimizer/concatenator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub fn concatenate(rule: Rule) -> Rule {
ty,
expr: expr.map_bottom_up(|expr| {
if ty == RuleType::Atomic {
// TODO: Use box syntax when it gets stabilized.
match expr {
Expr::Seq(lhs, rhs) => match (*lhs, *rhs) {
(Expr::Str(lhs), Expr::Str(rhs)) => Expr::Str(lhs + &rhs),
Expand Down
1 change: 0 additions & 1 deletion meta/src/optimizer/factorizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub fn factor(rule: Rule) -> Rule {
name,
ty,
expr: expr.map_top_down(|expr| {
// TODO: Use box syntax when it gets stabilized.
match expr {
Expr::Choice(lhs, rhs) => match (*lhs, *rhs) {
(Expr::Seq(l1, r1), Expr::Seq(l2, r2)) => {
Expand Down
1 change: 0 additions & 1 deletion meta/src/optimizer/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub fn list(rule: Rule) -> Rule {
name,
ty,
expr: expr.map_bottom_up(|expr| {
// TODO: Use box syntax when it gets stabilized.
match expr {
Expr::Seq(l, r) => match *l {
Expr::Rep(l) => {
Expand Down
2 changes: 0 additions & 2 deletions meta/src/optimizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ impl OptimizedExpr {
let expr = f(expr);

match expr {
// TODO: Use box syntax when it gets stabilized.
OptimizedExpr::PosPred(expr) => {
let mapped = Box::new(map_internal(*expr, f));
OptimizedExpr::PosPred(mapped)
Expand Down Expand Up @@ -211,7 +210,6 @@ impl OptimizedExpr {
{
let mapped = match expr {
OptimizedExpr::PosPred(expr) => {
// TODO: Use box syntax when it gets stabilized.
let mapped = Box::new(map_internal(*expr, f));
OptimizedExpr::PosPred(mapped)
}
Expand Down
1 change: 0 additions & 1 deletion meta/src/optimizer/rotater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::ast::*;
pub fn rotate(rule: Rule) -> Rule {
fn rotate_internal(expr: Expr) -> Expr {
match expr {
// TODO: Use box syntax when it gets stabilized.
Expr::Seq(lhs, rhs) => {
let lhs = *lhs;
match lhs {
Expand Down
1 change: 0 additions & 1 deletion meta/src/optimizer/skipper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub fn skip(rule: Rule) -> Rule {
ty,
expr: if ty == RuleType::Atomic {
expr.map_top_down(|expr| {
// TODO: Use box syntax when it gets stabilized.
if let Expr::Rep(expr) = expr.clone() {
if let Expr::Seq(lhs, rhs) = *expr {
if let (Expr::NegPred(expr), Expr::Ident(ident)) = (*lhs, *rhs) {
Expand Down
1 change: 0 additions & 1 deletion meta/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ impl<'i> ParserNode<'i> {
}

match node.expr {
// TODO: Use box syntax when it gets stabilized.
ParserExpr::PosPred(node) => {
filter_internal(*node, f, result);
}
Expand Down