diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-08 10:06:34 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-08 10:06:47 -0400 |
| commit | 4c4f6bcef476da2d233710a01634f283b01dbe7a (patch) | |
| tree | 26bed12815f3d29ed8dc7103bd1a6296aeb9f615 /src | |
| parent | 00fab16104f80d073373b9874942eb5424ffeee7 (diff) | |
Test for export of non-local variable
Diffstat (limited to 'src')
| -rw-r--r-- | src/c.bqn | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -203,7 +203,8 @@ Parse ← {r‿vn‿i‿e←𝕨⋄nv←≠vn idx←idg⊔(⍋d/ig)⊏d(/≥1↓PN)0<ig⊏xm # Exported identifier mask ui←(IT d)⊸⊏⌾(ig⊸⊏)id # Index of definition (⊐ for identifiers) lc←(1«b)/dn←b(⊢-T)+`idm∧ac M 2‿2 # Locals Count - idd←(id-○(⊏⟜fd)id≠⊸↑ui)∾0¨sp # Identifier frame depth + idd←(id-○(⊏⟜fd)ui)∾0¨sp # Identifier frame depth + "Can't export from surrounding scope"_err_(ID) xm∧0<id≠⊸↑idd idi←(ui⊏(fi⊏fsc)+dn-1)∾((sp⊏fi)⊏3×fx)++⟜(0⊸≤)2+sp⊏xv # Slot within frame uu←ip(((1«d)∧0=⊣)∧d(⊣+`⊸⊏PN)0<⊢)⌾(ig⊸⊏)idd# Unused marker idor←∾3⥊<id∾sp # Identifier bytecode ordering |
