306 |
306 |
<variable name="enclosing" type="java.util.Map" />
|
307 |
307 |
<variable name="accumRefs" type="java.util.Map" />
|
308 |
308 |
<variable name="refSet" type="java.util.Set" />
|
309 |
|
<variable name="previousNode" type="com.goldencode.ast.Aast" />
|
|
309 |
<variable name="prevNode" type="com.goldencode.ast.Aast" />
|
310 |
310 |
<variable name="fieldref" type="com.goldencode.ast.Aast" />
|
311 |
311 |
<variable name="scoperef" type="com.goldencode.ast.Aast" />
|
312 |
312 |
<variable name="accumref" type="com.goldencode.ast.Aast" />
|
|
313 |
<variable name="aggref" type="com.goldencode.ast.Aast" />
|
313 |
314 |
<variable name="key" type="java.lang.String" />
|
314 |
315 |
<variable name="fieldname" type="java.lang.String" />
|
315 |
316 |
<variable name="iter" type="java.util.Iterator" />
|
... | ... | |
411 |
412 |
1) class name of concrete Resolvable implementation to emit;
|
412 |
413 |
2) a unique instance variable [Java] name.
|
413 |
414 |
-->
|
414 |
|
<rule>
|
415 |
|
!evalLib("fieldtype", ref.type) and !evalLib("vartype", ref.type)
|
416 |
|
|
417 |
|
<!-- handle simple field references -->
|
|
415 |
<rule>!evalLib("fieldtype", ref.type) and !evalLib("vartype", ref.type)
|
|
416 |
|
|
417 |
<!-- handle simple field references, omitting those for COUNT aggregates -->
|
418 |
418 |
<rule on="false">evalLib("fieldtype", ref.type)
|
419 |
419 |
<rule>javaname == null
|
420 |
|
<action>javaname = sprintf("fieldRef%d", fieldNum)</action>
|
421 |
|
<action>fieldNum = fieldNum + 1</action>
|
|
420 |
<action>aggref = this.nextSibling</action>
|
|
421 |
<rule>aggref != null and aggref.getImmediateChild(prog.kw_count, null) == null
|
|
422 |
<action>javaname = sprintf("fieldRef%d", fieldNum)</action>
|
|
423 |
<action>fieldNum = fieldNum + 1</action>
|
|
424 |
<action on="false">copy.setHidden(true)</action>
|
|
425 |
</rule>
|
422 |
426 |
<action on="false">copy.setHidden(true)</action>
|
423 |
427 |
</rule>
|
424 |
428 |
</rule>
|
... | ... | |
800 |
804 |
</rule>
|
801 |
805 |
|
802 |
806 |
<!-- it is not the first use of this accumulator - so search for
|
803 |
|
the nearest block which contains all current known references
|
804 |
|
-->
|
805 |
|
<action on="false">
|
806 |
|
previousNode =
|
807 |
|
#(com.goldencode.ast.Aast) enclosing.get(javaname)
|
808 |
|
</action>
|
809 |
|
<action on="false">
|
810 |
|
iblockref = copy.nearestEnclosing(previousNode)
|
811 |
|
</action>
|
|
807 |
the nearest block which contains all current known references -->
|
|
808 |
<action on="false">prevNode = enclosing.get(javaname)</action>
|
|
809 |
<rule on="false">iblockref.id != prevNode.id and !prevNode.isAncestorOf(0, iblockref)
|
|
810 |
<action>iblockref = copy.nearestEnclosing(prevNode)</action>
|
|
811 |
</rule>
|
|
812 |
|
812 |
813 |
</rule>
|
813 |
814 |
|
814 |
815 |
<rule>
|