Skip to content

Commit

Permalink
Removed TODO about removed box syntax (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tartasprint authored May 6, 2023
1 parent 7f8411a commit 23831ec
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 10 deletions.
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

0 comments on commit 23831ec

Please sign in to comment.