INTERFACEAstToType ; IMPORT Atom, Wr; IMPORT AST, ASTWalk, M3Context; IMPORT Type; TYPE Handle <: Public; Public = ASTWalk.Closure OBJECT wr: Wr.T; intf: Atom.T; context: M3Context.T; END; PROCEDURE NewHandle(wr: Wr.T; intf: TEXT; c: M3Context.T): Handle;
Creates a new handle suitable for passing toASTWalk.VisitNodes
, or directly toNode
, from another walk. Thecallback
method is set toNode
. If NetObj.T is not defined in context c, returns NIL
PROCEDURE OneStub(c: M3Context.T; qid: Type.Qid; wr: Wr.T): INTEGER;
Generate stub code for the network object whose type is named byqid
.c
is the current compilation context. Errors and info output goes towr
. A non-zero returned value indicates an error
PROCEDURE Node(h: Handle; n: AST.NODE; vm: ASTWalk.VisitMode);
Ifn
is aProc_decl
node, output its name onh.wr
.
END AstToType.