2004/01/13 10:27:47
[org.ibex.core.git] / src / org / xwt / util / Grammar.java
index 48018c7..6ad2580 100644 (file)
@@ -6,7 +6,7 @@ import org.xwt.js.*;
 
 public abstract class Grammar extends JS {
 
-    public JSFunction action = null;
+    public JS action = null;
     public Grammar() { }
 
     // means we call()ed a Grammar that hasn't been bound to a scope yet
@@ -22,7 +22,7 @@ public abstract class Grammar extends JS {
         final int ret = match(s, start, v2, scope);
         Object result = ret == -1 ? NULL : action == null ?
             s.substring(start, ret) :
-            action.cloneWithNewParentScope(new JSScope(scope) {
+            JS.cloneWithNewParentScope(action, new JSScope(scope) {
                     public Object get(Object key) throws JSExn {
                         Object val = v2.get(key);
                         if (val == NULL) return null;