INTERFACEThis interface reveals to clients like JunoAssemble that the result produced by JunoCompile.Cmd is actually a restricted form of JunoAST.T.JunoCompileRep ;
IMPORT JunoAST, StackTbl, JunoScope;
FROM JunoCompileErr IMPORT Error;
TYPE
Result = BRANDED "JunoCompileRep.Result" OBJECT
cmd: JunoAST.Cmd
END;
PROCEDURE Cmd(
cmd: JunoAST.Cmd;
scp: JunoScope.T;
stack_tbl: StackTbl.T;
annotate := TRUE;
pure := FALSE):
Result RAISES {Error};
Compile the commandcmdaccording to theTotalCmdnon-terminal of the Juno grammar in the scopescp, producing a bytecode stream to be executed. The scopescpmust be aUnitscope. By default, this procedure first annotatescmd; useannotate := FALSEifcmdhas already been annotated.Raises
Errorin the event of a compilation error, or ifpureis set andcmdcontains a reference to a global variable or procedure.
END JunoCompileRep.