[KSS-checkins] r49930 - kukit/kukit.js/branch/finish-closures/kukit
gotcha at codespeak.net
gotcha at codespeak.net
Wed Dec 19 13:57:11 CET 2007
Author: gotcha
Date: Wed Dec 19 13:57:09 2007
New Revision: 49930
Modified:
kukit/kukit.js/branch/finish-closures/kukit/kssparser.js
Log:
class closures -- step 4
Modified: kukit/kukit.js/branch/finish-closures/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/finish-closures/kukit/kssparser.js (original)
+++ kukit/kukit.js/branch/finish-closures/kukit/kssparser.js Wed Dec 19 13:57:09 2007
@@ -595,7 +595,7 @@
}
};
};
-kssp.StringInSelector = kukit.tk.mkParser('string', {
+kssp.StringInSelector = kukit.tk.mkParserBis('string', {
"'": 'this.emitAndReturn(new kukit.kssp.quote(this.cursor))',
'\x5c': 'new kukit.kssp.Backslashed(this.cursor, kukit.kssp.backslash)'
},
@@ -605,33 +605,38 @@
/*
* class String2InSelector
*/
-kssp.String2InSelector = kukit.tk.mkParser('string', {
+kssp.String2InSelector = kukit.tk.mkParserBis('string', {
'"': 'this.emitAndReturn(new kukit.kssp.dquote(this.cursor))',
'\x5c': 'new kukit.kssp.Backslashed(this.cursor, kukit.kssp.backslash)'
},
- _String
+ _StringInSelector
);
/*
* class Backslashed
*/
-kssp.Backslashed = kukit.tk.mkParser('backslashed', {});
-kssp.Backslashed.prototype.nextStep = function(table) {
- // digest the next character and store it as txt
- var cursor = this.cursor;
- var length = cursor.text.length;
- if (length < cursor.pos + 1) {
-;;; kukit.E = 'Missing character after backslash.';
- this.emitError(kukit.E);
- } else {
- this.result.push(new kukit.tk.Fraction(cursor, cursor.pos+1));
- this.cursor.pos += 1;
- this.finished = true;
- }
-};
-kssp.Backslashed.prototype.process = function() {
- this.txt = this.result[1].txt;
+var _Backslashed = function() {
+ this.nextStep = function(table) {
+ // digest the next character and store it as txt
+ var cursor = this.cursor;
+ var length = cursor.text.length;
+ if (length < cursor.pos + 1) {
+;;; kukit.E = 'Missing character after backslash.';
+ this.emitError(kukit.E);
+ } else {
+ this.result.push(new kukit.tk.Fraction(cursor, cursor.pos+1));
+ this.cursor.pos += 1;
+ this.finished = true;
+ }
+ };
+ this.process = function() {
+ this.txt = this.result[1].txt;
+ };
};
+kssp.Backslashed = kukit.tk.mkParserBis('backslashed', {
+ },
+ _Backslashed
+ );
/*
* class MethodArgs
More information about the Kukit-checkins
mailing list