slow.monster

STUDIO HAZE · topaz

Topaz source

Open by house policy. Topaz is our own language.

Topaz 5.20 · 56 files

compiler/crates/topaz_self_frontend/topaz/dev/invocation.tpz

Topaz · 691 B · Original file

1// Source-direct invocation fixture. This development entry is not embedded K.
2import src.main { CompilerResult, Stage1Request, compile }
3import types { PreviewHostFact, PreviewHostQuery }
5export function compileWithFacts(
6 request: Stage1Request,
7 facts: Array<PreviewHostFact>,
8 observe: bool,
9 includeExports: bool,
10) -> Result<CompilerResult, string> {
11 compile(request, (query: PreviewHostQuery) => {
12 for fact in facts {
13 if fact.kind == query.kind && fact.mountId == query.mountId &&
14 fact.logicalPath == query.logicalPath {
15 return Ok(fact)
16 }
17 }
18 Err("fixture has no fact for {query.kind}:{query.logicalPath}")
19 }, observe, includeExports)

SHA256 7be22f829650e42b609deaa800553687024821fe8ae594d49e5c5dad4e9faa95