mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-03-15 12:46:07 +01:00
write prInt
This commit is contained in:
parent
d9868e3111
commit
7f65dc0277
8 changed files with 155 additions and 40 deletions
|
|
@ -541,11 +541,13 @@ function printImport(import_: Import, f: Formatter) {
|
|||
});
|
||||
}
|
||||
|
||||
function printFunction(func: Func, f: Formatter) {
|
||||
function printFunction(func: Func, idx: number, f: Formatter) {
|
||||
f.sexpr(() => {
|
||||
f.keyword("func");
|
||||
printId(func._name, f);
|
||||
|
||||
f.word(`(;${idx};)`, chalk.gray);
|
||||
|
||||
f.sexpr(() => {
|
||||
f.keyword("type");
|
||||
f.type(func.type);
|
||||
|
|
@ -678,9 +680,9 @@ function printModule(module: Module, f: Formatter) {
|
|||
printImport(import_, f);
|
||||
});
|
||||
|
||||
module.funcs.forEach((func) => {
|
||||
module.funcs.forEach((func, i) => {
|
||||
breakIfAny();
|
||||
printFunction(func, f);
|
||||
printFunction(func, i + module.imports.length, f);
|
||||
});
|
||||
|
||||
module.tables.forEach((table) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue