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

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

            while (prototype != null && prototype != this)
            {
                prototype = prototype.Prototype;
            }
            return(new BikeBoolean(prototype != null));
        }
Example #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;
 }
Example #6
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;
        }
Example #7
0
 public static bool IsTypeError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "TypeError"));
 }
Example #8
0
 public static bool IsAlreadyDefinedError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "AlreadyDefinedError"));
 }
Example #9
0
 public static bool IsNotDefinedError(BikeObject bo)
 {
     return(IsErrorOfType(bo, "NotDefinedError"));
 }
Example #10
0
 public BikeObject(BikeObject prototype)
 {
     Prototype = prototype;
     Members[InterpreterHelper.SpecialSuffix + "members"] = Members;
 }
Example #11
0
 public BikeObject(BikeObject prototype)
 {
     Prototype = prototype;
     Members[InterpreterHelper.SpecialSuffix + "members"] = Members;
 }
Example #12
0
 public static bool IsTypeError(BikeObject bo)
 {
     return IsErrorOfType(bo, "TypeError");
 }
Example #13
0
 public static bool IsNotDefinedError(BikeObject bo)
 {
     return IsErrorOfType(bo, "NotDefinedError");
 }
Example #14
0
 public static bool IsAlreadyDefinedError(BikeObject bo)
 {
     return IsErrorOfType(bo, "AlreadyDefinedError");
 }