[stringtemplate-interest] global boolean
Sam Harwell
sharwell at pixelminegames.com
Mon Apr 11 08:59:00 PDT 2011
I made it an instance variable from the start for just this reason. :)
Set it to true for the STGroup created in CodeGenerator (in the Tool).
Change the signature of convertAnythingIteratableToIterator to
convertAnythingIteratableToIterator(InstanceScope, object). That will reveal
a number of other methods that need the exact same.
Test the value with
(scope.st.groupThatCreatedThisInstance.iterateAcrossValues). (I believe this
is correct - for the C# port it's frame.Template.Group.IterateAcrossValues).
Sam
-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence Parr
Sent: Monday, April 11, 2011 10:19 AM
To: stringtemplate-interest List
Subject: [stringtemplate-interest] global boolean
ooops. the intro of STGroup.iterateAcrossValues to make maps iterate across
values ala v3 not keys like v4 could be a problem if someone uses ANTLR's
Tool object in their VM *and* ST v4. ANTLR sets this for v3 compat but if,
say, eclipse calls antlr but a plugin uses ST v4 "properly"...bang!
maybe put it on STGroup instances and force antlr to set it all over in
code. i guess that is better. grr...I was stupido this weekend.
Ter
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list