fix next_ctx bug

This commit is contained in:
Kangzhi Shi
2022-08-02 21:24:11 +02:00
committed by Steve Shi
parent 982d8f53f2
commit ccae898885

View File

@@ -33,7 +33,7 @@ macro_rules! next_ctx {
next_ctx!(position $ctx.code_position + $offset, $state, $ctx, $handler)
};
(from $peek:expr, $state:expr, $ctx:expr, $handler:expr) => {
next_ctx!(position $ctx.peek_code($state, $peek) as usize + 1, $state, $ctx, $handler)
next_ctx!(offset $ctx.peek_code($state, $peek) as usize + 1, $state, $ctx, $handler)
};
(position $position:expr, $state:expr, $ctx:expr, $handler:expr) => {{
$ctx.handler = Some($handler);