v4 Semantics

Loop legality

  • break and continue require active loop context
  • track loopDepth
  • emit deterministic diagnostics

for loop analysis

  • dedicated loop scope for init/cond/post/body
  • loop scope ends at loop end

while semantics

  • no new variable scope from header
  • loopDepth still controls break/continue legality

Function + loop context

  • track functionDepth and loopDepth independently
  • return and continue/break are separate legality checks

Short-circuit analysis

  • analyze both sides of && and ||
  • do not skip static errors on RHS

Layered checks

  • keep v3/v4 checks for names, redeclarations, consts, arity, return

Quick checks

  • nested loops
  • invalid post variable references
  • unresolved names in logical RHS
1 / 1
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.