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 commandcmd
according to theTotalCmd
non-terminal of the Juno grammar in the scopescp
, producing a bytecode stream to be executed. The scopescp
must be aUnit
scope. By default, this procedure first annotatescmd
; useannotate := FALSE
ifcmd
has already been annotated.Raises
Error
in the event of a compilation error, or ifpure
is set andcmd
contains a reference to a global variable or procedure.
END JunoCompileRep.