~/bend-docscommunity

bolt/rules/correctness/foreign.bend fails

raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/rules/correctness/foreign.bend as Foreign

rule foreign: a foreign def (its body only import "./x.c" / import "./x.js" lines) with a body for one lane and not the other. Each lane finds out only when it first runs: a native build (bend -o bin) fails with "no .c import", an interpreted or JS run with "a foreign def without a .js import". Give every foreign def both bodies, x.c and x.js. A file headed # lanes: native never runs on the JS lane, so it needs no .js.

6 imports
import Base
import ../../src.bend as Src
import ../../finding.bend as F
import ../../../syntax/lex.bend as Lex
import ../../../syntax/tree.bend as Tree
import ../../../syntax/bind.bend as Bind