Henry,

I have the constraint function generator mostly ready.

First question - do we need an option to compute meta references?
That's apparently a compile time option, but I don't see when it's turned on.

In my current version, I am accepting as arguments 1) the name of the original function,
and 2) the source for the function, for the moment I expect the source
to look just like what you are now generating.

I am returning the source of a function with the name XXX_dependencies.

For example, input source is this: (culled from where this string is made in NodeModel.java):

===
 function $base$2Fbasefocusview$2Elzx_282_41_x_always () {
#pragma 'constraintFunction'

#pragma 'withThis'
this.setAttribute("x",
#beginAttribute

#file base/basefocusview.lzx
#line 282
                                         -classroot.offset
#endAttribute
)}
===

Output source is currently:

===
/* -*- file: Compiler.substitute#-1.1 -*- */
function $base$2Fbasefocusview$2Elzx_282_41_x_always_dependencies () {
#pragma "warnUndefinedReferences=false";
with (this) {
return [classroot, "offset"]
}}
===

I'm thinking instead I could accept simply '-classroot.offset'
and return just the text of the statements:
  with (this) {
    return [classroot, "offset"]
 }

Then you could name the function whatever you want or
use it as a function expression.  Or I could return just the
array (as an expression) like '[classroot, "offset"]' .  It depends
on how you plan to use it, vs. how much of the details you need to know.

- Don

--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: [EMAIL PROTECTED]
www: http://www.ddanderson.com




Reply via email to