lemmascript
Advanced tools
+1
-1
| { | ||
| "name": "lemmascript", | ||
| "version": "0.5.17", | ||
| "version": "0.5.18", | ||
| "description": "A verification toolchain for TypeScript — generates Lean 4 or Dafny from annotated TS", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -37,2 +37,3 @@ /** | ||
| */ | ||
| import { isTerminatorKind } from "./typedir.js"; | ||
| import { freshName } from "./names.js"; | ||
@@ -922,4 +923,3 @@ // ── Optional-check detection ──────────────────────────────── | ||
| return false; | ||
| const last = stmts[stmts.length - 1]; | ||
| return last.kind === "return" || last.kind === "throw" || last.kind === "break" || last.kind === "continue"; | ||
| return isTerminatorKind(stmts[stmts.length - 1].kind); | ||
| } | ||
@@ -926,0 +926,0 @@ /** Rule (list-level): consecutive `if (x.kind === "v") ...` chain → tagMatch. |
@@ -47,1 +47,7 @@ /** | ||
| } | ||
| /** Statement kinds that unconditionally leave the enclosing block. Shared by | ||
| * resolve (block-tail narrowing) and narrow (isTerminating); works on raw and | ||
| * typed IR alike since both use these kind strings. */ | ||
| export function isTerminatorKind(kind) { | ||
| return kind === "return" || kind === "throw" || kind === "break" || kind === "continue"; | ||
| } |
Sorry, the diff of this file is too big to display
646062
0.08%12579
0.07%