Esempio n. 1
0
 public static void Load(Arguments args, VM vm, SourceInfo info)
 {
     ValueString str = args[0] as ValueString;
     if (str == null)
     {
         throw new RheaException(
             string.Format("string required, but got {0}", args[0]),
             info
         );
     }
     string fileName = str.Value;
     Interpreter interp = new Interpreter(vm.Env);
     bool result = interp.InterpretFile(fileName);
     vm.Push(result.ToValueBool());
 }