private BoundProcedure Bind(Procedure proc) { if (functions.ContainsKey(proc.Name)) { AddError(new Error(ErrorKind.ProcedureNameConflictsWithBuiltInFunction, proc.Name)); } var boundProcedure = new BoundProcedure(proc.Name, new BoundBlock(proc.Block.Statements.Select(Bind).ToList())); procedures.Add(proc.Name, boundProcedure); return(boundProcedure); }
public void Visit(BoundProcedure fd) { sa.Print(fd.Name); fd.Block.Accept(this); }
private Task <Either <RuntimeErrors, Success> > Execute(BoundProcedure main) { return(Execute(main.Block)); }