[stringtemplate-interest] Working on ST4 ObjC runtime
Alan Condit
acondit at IPNS.COM
Tue Mar 27 10:48:33 PDT 2012
I am working on TestGroup and I am currently passing 31 of the first 32 tests so I must be getting close but currently have a problem with this test:
@Test public void testSubdirWithSubtemplate() throws Exception {
// /randomdir/a and /randomdir/subdir/b
String dir = getRandomDir();
writeFile(dir+"/subdir", "a.st", "a(x) ::= \"<x:{y|<y>}>\"");
STGroup group = new STGroupDir(dir);
ST st = group.getInstanceOf("/subdir/a");
st.add("x", new String[] {"a", "b"});
assertEquals("ab", st.render());
}
In interpreter when it accesses the _sub1 template, st.impl.formalArguments is null so it is not copying over the st.locals and as a result generates no output.
I have looked at my code and the original java code, I can't see where I am going wrong.
It looks like st.locals should be propagated in Interpreter in setFirstArgument but when I get there both st.impl.formalArguments and st.locals are nil. I can't figure out where st.impl.formalArguments is supposed to be set.
Can anybody give me a clue where to look?
Thanks,
Alan
---
Alan Condit
1085 Tierra Ct.
Woodburn, OR 97071
Email -- acondit at ipns.com
Home-Office (503) 982-0906
More information about the stringtemplate-interest
mailing list