Skip to content

Commit

Permalink
refactor: begin adding sibling and parent movement
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Apr 24, 2024
1 parent 2eeacda commit 10908cd
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 109 deletions.
6 changes: 1 addition & 5 deletions crates/redos-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ pub fn ir(regex: &str) -> String {
let parser = Parser::parse(regex);
format!(
"{:#?}",
parser.map(|tree| redos::ir::to_expr(
&tree.expr,
&Default::default(),
nonzero_lit::usize!(1)
))
parser.map(|tree| redos::ir::to_expr(&tree.expr, &Default::default()))
)
}

Expand Down
3 changes: 1 addition & 2 deletions crates/redos/src/ilq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn scan_ilq(expr: &Expr) -> IlqReturn {
// a required token.

scan_ilq_concat(list)
},
}
Expr::Group(e, _) => scan_ilq(e),

// a repeating token? interesting.. we'll need to scan the child
Expand All @@ -72,7 +72,6 @@ enum ConcatResults {
}

fn scan_ilq_concat(exprs: &Vec<Expr>) -> IlqReturn {

// first, lets try to hit a repeat token
for expr in exprs {
let result: ConcatResults = match expr {
Expand Down
Loading

0 comments on commit 10908cd

Please sign in to comment.