2003/06/07 08:21:30
[org.ibex.core.git] / src / org / xwt / js / JS.java
index c053881..65bb465 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] 
+// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL] 
 
 package org.xwt.js; 
 import org.xwt.util.*; 
@@ -132,6 +132,7 @@ public abstract class JS {
     public static abstract class Function extends Obj {
        public abstract Object _call(JS.Array args) throws JS.Exn;
        public String getSourceName() throws JS.Exn { return "unknown"; }
+       public int getLine() throws JS.Exn { return -1; }
        public final Object call(JS.Array args) throws JS.Exn { return _call(args); }
     }
 
@@ -161,7 +162,7 @@ public abstract class JS {
            try {
                Vector exprs = new Vector();
                while(true) {
-                   ForthBlock ret = p.parseStatement(false);
+                   ForthBlock ret = p.parseStatement();
                    if (ret == null) break;
                    exprs.addElement(ret);
                }
@@ -194,7 +195,10 @@ public abstract class JS {
            else super.put(key, val == null ? NULL : val);
        }
        public Object[] keys() { throw new Error("you can't enumerate the properties of a Scope"); }
-       public void declare(String s) { if (isTransparent()) getParentScope().declare(s); else super.put(s, NULL);}
+       public void declare(String s) {
+           if (isTransparent()) getParentScope().declare(s);
+           else super.put(s, NULL);
+       }
     }