Inheritance: System.Exception, IScope, IEnumerable
Exemple #1
0
 public static bool IsErrorOfType(BikeObject bo, string errorType)
 {
     if (bo == null)
         return false;
     var prototype = ResolvePrototype(errorType);
     return prototype.IsPrototypeOf(bo).Value;
 }
Exemple #2
0
 public BikeBoolean IsPrototypeOf(BikeObject other)
 {
     var prototype = other.Prototype;
     while (prototype != null && prototype != this)
         prototype = prototype.Prototype;
     return new BikeBoolean(prototype != null);
 }
        public static bool IsErrorOfType(BikeObject bo, string errorType)
        {
            if (bo == null)
            {
                return(false);
            }
            var prototype = ResolvePrototype(errorType);

            return(prototype.IsPrototypeOf(bo).Value);
        }
        public BikeBoolean IsPrototypeOf(BikeObject other)
        {
            var prototype = other.Prototype;

            while (prototype != null && prototype != this)
            {
                prototype = prototype.Prototype;
            }
            return(new BikeBoolean(prototype != null));
        }
Exemple #5
0
 private void DefineVariables()
 {
     var paramsObj = new BikeArray();
     for (int i = 0; i < Parameters.Count; i++)
     {
         var parameter = Parameters[i];
         var paramObj = new BikeObject(InterpretationContext.ObjectBase);
         paramObj.Define("name", new BikeString(parameter.Identifier.Value));
         paramObj.Define("is_params", new BikeBoolean(parameter.IsParams));
         paramsObj.Define(i.ToString(), paramObj);
     }
     Members["params"] = paramsObj;
 }
        private void DefineVariables()
        {
            var paramsObj = new BikeArray();

            for (int i = 0; i < Parameters.Count; i++)
            {
                var parameter = Parameters[i];
                var paramObj  = new BikeObject(InterpretationContext.ObjectBase);
                paramObj.Define("name", new BikeString(parameter.Identifier.Value));
                paramObj.Define("is_params", new BikeBoolean(parameter.IsParams));
                paramsObj.Define(i.ToString(), paramObj);
            }
            Members["params"] = paramsObj;
        }
 public static bool IsTypeError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "TypeError"));
 }
 public static bool IsAlreadyDefinedError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "AlreadyDefinedError"));
 }
 public static bool IsNotDefinedError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "NotDefinedError"));
 }
Exemple #10
0
 public BikeObject(BikeObject prototype)
 {
     Prototype = prototype;
     Members[InterpreterHelper.SpecialSuffix + "members"] = Members;
 }
Exemple #11
0
 public BikeObject(BikeObject prototype)
 {
     Prototype = prototype;
     Members[InterpreterHelper.SpecialSuffix + "members"] = Members;
 }
Exemple #12
0
 public static bool IsTypeError(BikeObject bo)
 {
     return IsErrorOfType(bo, "TypeError");
 }
Exemple #13
0
 public static bool IsNotDefinedError(BikeObject bo)
 {
     return IsErrorOfType(bo, "NotDefinedError");
 }
Exemple #14
0
 public static bool IsAlreadyDefinedError(BikeObject bo)
 {
     return IsErrorOfType(bo, "AlreadyDefinedError");
 }