X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FTemplate.java;h=2f3e2acef89baddfa7cbe2619bb22bcead772540;hb=b1568b13f53ca805911fcd7737daf79492d6be1f;hp=0461dbc5dcac30d70f5808ec764525f8f3a11c20;hpb=753c136696402d156d7eb558d2484dd5fcbab713;p=org.ibex.core.git diff --git a/src/org/ibex/Template.java b/src/org/ibex/Template.java index 0461dbc..2f3e2ac 100644 --- a/src/org/ibex/Template.java +++ b/src/org/ibex/Template.java @@ -34,6 +34,7 @@ public class Template { Template prev; Template prev2; JSScope staticScope = null; ///< the scope in which the static block is executed + JS staticObject = null; // Only used during parsing ///////////////////////////////////////////////////////////////// @@ -81,7 +82,7 @@ public class Template { // FIXME this dollar stuff is all wrong if (id != null) parentPis.putDollar(id, b); - PerInstantiationScope pis = new PerInstantiationScope(b, ibex, parentPis, staticScope); + PerInstantiationScope pis = new PerInstantiationScope(b, ibex, parentPis, staticObject); for(int i=0; i i; i++) t.content.append('\n'); } } @@ -326,13 +328,13 @@ public class Template { private static class PerInstantiationScope extends JSScope { Ibex ibex = null; PerInstantiationScope parentBoxPis = null; - JSScope myStatic = null; + JS myStatic = null; void putDollar(String key, Box target) throws JSExn { if (parentBoxPis != null) parentBoxPis.putDollar(key, target); declare("$" + key); put("$" + key, target); } - public PerInstantiationScope(JSScope parentScope, Ibex ibex, PerInstantiationScope parentBoxPis, JSScope myStatic) { + public PerInstantiationScope(JSScope parentScope, Ibex ibex, PerInstantiationScope parentBoxPis, JS myStatic) { super(parentScope); this.parentBoxPis = parentBoxPis; this.ibex = ibex;