Created
February 4, 2010 19:04
-
-
Save boucher/294983 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --cc Objective-J/Preprocessor.js | |
| index f261cb9,9f2855c..0000000 | |
| --- a/Objective-J/Preprocessor.js | |
| +++ b/Objective-J/Preprocessor.js | |
| @@@ -342,14 -371,28 +342,31 @@@ Preprocessor.prototype.implementation | |
| token = tokens.skip_whitespace(); | |
| if (token == TOKEN_CLOSE_PARENTHESIS) | |
| - objj_exception_throw(new objj_exception(OBJJParseException, this.error_message("*** Can't Have Empty Category Name for class \"" + class_name + "\"."))); | |
| + throw new SyntaxError(this.error_message("*** Can't Have Empty Category Name for class \"" + class_name + "\".")); | |
| if (tokens.skip_whitespace() != TOKEN_CLOSE_PARENTHESIS) | |
| - objj_exception_throw(new objj_exception(OBJJParseException, this.error_message("*** Improper Category Definition for class \"" + class_name + "\"."))); | |
| + throw new SyntaxError(this.error_message("*** Improper Category Definition for class \"" + class_name + "\".")); | |
| CONCAT(buffer, "{\nvar the_class = objj_getClass(\"" + class_name + "\")\n"); | |
| - CONCAT(buffer, "if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, \"*** Could not find definition for class \\\"" + class_name + "\\\"\"));\n"); | |
| + CONCAT(buffer, "if(!the_class) throw new SyntaxError(\"*** Could not find definition for class \\\"" + class_name + "\\\"\");\n"); | |
| CONCAT(buffer, "var meta_class = the_class.isa;"); | |
| ++<<<<<<< HEAD:Objective-J/Preprocessor.js | |
| ++======= | |
| + | |
| + var superclass_name = dictionary_getValue(SUPER_CLASSES, class_name); | |
| + | |
| + // FIXME: We should have a better solution for this case, although it's actually not much slower than the real case. | |
| + if (!superclass_name) | |
| + { | |
| + this._currentSuperClass = "objj_getClass(\"" + class_name + "\").super_class"; | |
| + this._currentSuperMetaClass = "objj_getMetaClass(\"" + class_name + "\").super_class"; | |
| + } | |
| + else | |
| + { | |
| + this._currentSuperClass = "objj_getClass(\"" + superclass_name + "\")"; | |
| + this._currentSuperMetaClass = "objj_getMetaClass(\"" + superclass_name + "\")"; | |
| + } | |
| ++>>>>>>> jake:Objective-J/Runtime/preprocess.js | |
| } | |
| else | |
| { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment