Exemplo n.º 1
0
 private static Environment.Frame createConstantsGlobals() {
   try (Mutability mutability = Mutability.create("CONSTANTS")) {
     Environment env = Environment.builder(mutability).build();
     Runtime.setupConstants(env);
     return env.getGlobals();
   }
 }
Exemplo n.º 2
0
 private static Environment.Frame createSkylarkGlobals() {
   try (Mutability mutability = Mutability.create("SKYLARK")) {
     Environment env = Environment.builder(mutability).setSkylark().build();
     Runtime.setupConstants(env);
     Runtime.setupMethodEnvironment(env, MethodLibrary.skylarkGlobalFunctions);
     return env.getGlobals();
   }
 }