Stmt Stmt.Visitor <Stmt> .VisitFunctionStmt(Stmt.Function stmt) { JukaFunction functionCallable = new JukaFunction(stmt, null, false); environment.Define(stmt.name.ToString(), functionCallable); return(null); }
internal JukaInterpreter(ServiceProvider services) { environment = globals = new JukaEnvironment(); this.serviceProvider = services; if (serviceProvider != null) { #pragma warning disable CS8604 // Possible null reference argument. globals.Define("clock", serviceProvider.GetService <ISystemClock>()); globals.Define("fileOpen", services.GetService <IFileOpen>()); #pragma warning restore CS8604 // Possible null reference argument. } else { throw new JRuntimeException("Unable to load system calls"); } }