mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-14 16:35:03 +01:00
crates work
This commit is contained in:
parent
b3b0bc2e6f
commit
c4cfa19fa9
7 changed files with 125 additions and 49 deletions
|
|
@ -72,7 +72,7 @@ function main() {
|
|||
console.log(resolvedPrinted);
|
||||
|
||||
console.log("-----AST typecked------");
|
||||
const typecked: Crate<Typecked> = typeck(resolved);
|
||||
const typecked: Crate<Typecked> = typeck(resolved, crates);
|
||||
const typeckPrinted = printAst(typecked);
|
||||
console.log(typeckPrinted);
|
||||
|
||||
|
|
@ -135,7 +135,8 @@ function loadCrate(
|
|||
const tokens = tokenize(input);
|
||||
const ast = parse(name, tokens, crateId.next());
|
||||
const [resolved, crates] = resolve(ast, loadCrate);
|
||||
const typecked = typeck(resolved);
|
||||
|
||||
const typecked = typeck(resolved, [...existingCrates, ...crates]);
|
||||
return [typecked, crates];
|
||||
} catch (e) {
|
||||
withErrorPrinter(input, filename, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue