Skip to content

Commit 4c9193c

Browse files
committed
Adjust generate script
1 parent 5f8f38d commit 4c9193c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/generate_opcode_metadata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ def extract_enum_body(contents: str, enum_name: str) -> str:
7474

7575
def build_deopts(contents: str) -> dict[str, list[str]]:
7676
raw_body = re.search(
77-
r"fn deoptimize\(self\) -> Self(.*)", contents, re.DOTALL
77+
r"fn deopt\(self\) -> Option<Self>(.*)", contents, re.DOTALL
7878
).group(1)
7979
body = "\n".join(
8080
itertools.takewhile(
8181
lambda l: not l.startswith("_ =>"), # Take until reaching fallback
8282
filter(
8383
lambda l: (
84-
not l.startswith(("//", "match")) # Skip comments or start of match
84+
not l.startswith(
85+
("//", "Some(match")
86+
) # Skip comments or start of match
8587
),
8688
map(str.strip, raw_body.splitlines()),
8789
),

0 commit comments

Comments
 (0)