MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / patch_to

Method patch_to

compiler/src/modules/parser/mod.rs:389–391  ·  view source on GitHub ↗

Patch a jump to an explicit target; bounds-safe so instruction overflow (`emit` freezes at MAX_INSTRUCTIONS) can't panic on a stale index. */

(&mut self, pos: usize, target: u16)

Source from the content-addressed store, hash-verified

387
388 /* Patch a jump to an explicit target; bounds-safe so instruction overflow (`emit` freezes at MAX_INSTRUCTIONS) can't panic on a stale index. */
389 pub(super) fn patch_to(&mut self, pos: usize, target: u16) {
390 if let Some(ins) = self.chunk.instructions.get_mut(pos) { ins.operand = target; }
391 }
392
393 /* Consumes kind or emits diagnostic; for missing closers anchors at opener and drops cascade. */
394 pub(super) fn eat(&mut self, kind: TokenType) {

Callers 3

parse_patternMethod · 0.80
try_stmtMethod · 0.80
with_stmt_innerMethod · 0.80

Calls 1

get_mutMethod · 0.80

Tested by

no test coverage detected