Geoff the Medio wrote:
What do you mean by "It works (c), but loop checks remains." ?
Does the order of strings matter? In particular, can a string refer to another string defined after it in the stringtable?
What happens if a string references another string which itself references another string? (Again, does order matter?)
Are circular references resolved somehow?
Does this definitely not interfere with tagged string references like [[tech TECH_NAME_STRINGTABLE_ENTRY]] that are replaced with in-UI links?
Code is executed after all keys is loaded, and "tagged string references" resolved. Regex looks for [[singleword]] in values and replaces with expanded value of that key (single word found). sregex_iterator is reinitialized after replacement, which means resultstring is reevaluated until resolved. Order does not matter, references to keys that contains references also works well.
This problem remains to be solved:
TEST1
Bla bla bla [[TEST2]]
TEST2
Bla bla blah [[TEST1]]
I've considered pushing the KEY being resolved onto some stack, check for roundtrips, and make a graceful exit. But... quite honestly my Boost lib skills aren't that adequate yet
