[KSS-checkins] r50395 - in kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes: . kukit tests

reebalazs at codespeak.net reebalazs at codespeak.net
Sun Jan 6 17:19:25 CET 2008


Author: reebalazs
Date: Sun Jan  6 17:19:25 2008
New Revision: 50395

Modified:
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/   (props changed)
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
Log:
Remove PropValueInMethod: it's not used or needed any more

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js	Sun Jan  6 17:19:25 2008
@@ -446,29 +446,6 @@
 };
 
 /*
-* class PropValueInMethod
-*
-* PropValue in method cannot have method-style vars.
-*/
-kukit.kssp.PropValueInMethod = kukit.tk.mkParser('propValue', {
-    ";": 'this.emitAndReturn()',
-    "}": 'this.emitAndReturn()',
-    ")": 'this.emitAndReturn()',
-    "]": 'this.emitAndReturn()',
-    ",": 'this.emitAndReturn()',
-    "'": 'new kukit.kssp.String(this.cursor, kukit.kssp.quote)',
-    '"': 'new kukit.kssp.String2(this.cursor, kukit.kssp.dquote)',
-    "\/\*": 'new kukit.kssp.Comment(this.cursor, kukit.kssp.openComment)'
-    });
-kukit.kssp.PropValueInMethod.prototype.multiword_allowed = false;
-kukit.kssp.PropValueInMethod.prototype.process =
-    kukit.kssp.PropValue.prototype.process;
-kukit.kssp.PropValueInMethod.prototype.produceTxt = function(txt) {
-    // txt parms are returned unwrapped
-    this.txt = txt;
-};
-
-/*
 * class EventValue
 *
 * PropValue in pseudo must be single word with no spaces around.

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js	Sun Jan  6 17:19:25 2008
@@ -69,89 +69,6 @@
 kukit.KssParserTestCase = function() {
     this.name = 'kukit.KssParserTestCase';
  
-    this.testPropvalueInMethod = function() {
-        // Parsing prop values (no methods allowed)
-        var txt= "apple;";
-        var cursor = new kukit.tk.Cursor(txt);
-        var parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'apple');
-
-        txt= "'a  string';";
-        cursor = new kukit.tk.Cursor(txt);
-        parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'a  string');
-
-        txt= '"a  string";';
-        cursor = new kukit.tk.Cursor(txt);
-        parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'a  string');
-
-        txt= '"a  \\"string";';
-        cursor = new kukit.tk.Cursor(txt);
-        parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'a  "string');
-
-        txt= " /* valid */ 'a  string' /* here*/ /*and*/ /*there*/;";
-        cursor = new kukit.tk.Cursor(txt);
-        parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'a  string');
-
-        txt= " in /* valid */ 'a  string';";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true, 'Wrong value : unallowed characters [in] before a string.');
-
-        txt= " 'a  string' trashy;";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true, 'Wrong value : unallowed characters after the property.');
-
-        txt= " 'a  string' trashy \"trishy\";";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true, 'Wrong value : unallowed characters after the property.');
-
-        // multiword not ok
-        txt= "b   c";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true,
-            'Wrong value : [b c] cannot have spaces.', 5);
-
-        txt= "  apples and   oranges   ;";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true,
-            'Wrong value : [apples and oranges] cannot have spaces.', 25);
-
-        txt= " /* comments; */ apples and  /* more comments and*/ oranges   ;";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true,
-            //'Wrong value : [/* comments; */ apples and /* more comments and*/ oranges ;] cannot have spaces.', 62);
-            'Wrong value : [apples and oranges] cannot have spaces.', 62);
-
-        // in string, multiword ok even in method
-        txt= "'b   c' ";
-        cursor = new kukit.tk.Cursor(txt);
-        parser = new kukit.kssp.PropValueInMethod(cursor, null, true);
-        this.assertEquals(parser.finished, true);
-        this.assertEquals(parser.txt, 'b   c');
-        this.assertEquals(parser.parms, null);
-
-        // Not ok
-        txt= "a'b c'";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true,
-            'Wrong value : unallowed characters [a] before a string', 6);
-
-        // Not ok
-        txt= "'a''b c'";
-        cursor = new kukit.tk.Cursor(txt);
-        this.assertParsingError(kukit.kssp.PropValueInMethod, cursor, null, true,
-            'Wrong value : unallowed characters after the property.', 6);
-
-    };
-
     this.testPropValue = function() {
         // Parsing property values 
 


More information about the Kukit-checkins mailing list