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); }
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)); }
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")); }
public BikeObject(BikeObject prototype) { Prototype = prototype; Members[InterpreterHelper.SpecialSuffix + "members"] = Members; }
public BikeObject(BikeObject prototype) { Prototype = prototype; Members[InterpreterHelper.SpecialSuffix + "members"] = Members; }
public static bool IsTypeError(BikeObject bo) { return IsErrorOfType(bo, "TypeError"); }
public static bool IsNotDefinedError(BikeObject bo) { return IsErrorOfType(bo, "NotDefinedError"); }
public static bool IsAlreadyDefinedError(BikeObject bo) { return IsErrorOfType(bo, "AlreadyDefinedError"); }