pub fn build(
rawast: &RawAst,
env: Env,
foreign: &mut ForeignModules,
) -> Result<(Rast, Diagnostics), Diagnostics>Expand description
Build the resolved AST of a project the front end has checked on env,
which holds its data layer (build_data), over the store of the files
its imports loaded, recording in it where each called function is
(ffis).
Returns the declarations, the bodies, and the warnings (a body variable shadowing a local, a mapping or a const).
The system (build_system), the programs (build_programs), then
the vaddrs (lay_out), each stage reporting its faults before the
next starts.
ยงErrors
- a declaration of a name already declared, of the same kind;
- more protection domains than
PdId::MAXallows; - a hand-built project whose programs and protection domains differ in number;
- an import whose file was not read;
- a Pancake export C cannot call (more than four arguments) or named like a Microkit entry point;
- a name that does not resolve;
- a call to a foreign function whose signature fic cannot express;
- a body variable redeclared in scope;
- an assignment to a carrier or a const;
- an entry point with parameters.