Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit ca20b59

Browse files
committed
update version to 0.3.0
1 parent f3b3044 commit ca20b59

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sre-engine"
3-
version = "0.2.1"
3+
version = "0.3.0"
44
authors = ["Kangzhi Shi <shikangzhi@gmail.com>", "RustPython Team"]
55
description = "A low-level implementation of Python's SRE regex engine"
66
repository = "https://github.com/RustPython/sre-engine"

src/engine.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ fn dispatch<'a, S: StrDrive>(
253253
ctx.skip_char(state, 1);
254254
}
255255
}
256-
/* assert subpattern */
257-
/* <ASSERT> <skip> <back> <pattern> */
258256
SreOpcode::ASSERT => op_assert(state, ctx),
259257
SreOpcode::ASSERT_NOT => op_assert_not(state, ctx),
260258
SreOpcode::AT => {
@@ -334,7 +332,6 @@ fn op_assert<'a, S: StrDrive>(state: &mut State<'a, S>, ctx: &mut MatchContext<'
334332
return ctx.failure();
335333
}
336334

337-
// let next_ctx = state.next_ctx(ctx, 3, |state, ctx| {
338335
let next_ctx = next_ctx!(offset 3, state, ctx, |state, ctx| {
339336
if state.popped_has_matched {
340337
ctx.skip_code_from(state, 1);
@@ -371,7 +368,6 @@ fn op_assert_not<'a, S: StrDrive>(state: &mut State<'a, S>, ctx: &mut MatchConte
371368
// alternation
372369
// <BRANCH> <0=skip> code <JUMP> ... <NULL>
373370
fn op_branch<'a, S: StrDrive>(state: &mut State<'a, S>, ctx: &mut MatchContext<'a, S>) {
374-
// state.marks_push();
375371
mark!(push, state);
376372

377373
ctx.count = 1;
@@ -403,7 +399,6 @@ fn op_branch<'a, S: StrDrive>(state: &mut State<'a, S>, ctx: &mut MatchContext<'
403399
/* <MIN_REPEAT_ONE> <skip> <1=min> <2=max> item <SUCCESS> tail */
404400
fn op_min_repeat_one<'a, S: StrDrive>(state: &mut State<'a, S>, ctx: &mut MatchContext<'a, S>) {
405401
let min_count = ctx.peek_code(state, 2) as usize;
406-
// let max_count = ctx.peek_code(state, 3) as usize;
407402

408403
if ctx.remaining_chars(state) < min_count {
409404
return ctx.failure();

0 commit comments

Comments
 (0)