// queried. (To be in sync with the open-quote thing..
quoteLevel -= 1;
final QuotesPair currentQuote = getQuotesPair();
if (currentQuote != null)
{
return new ResolvedStringToken
(closeQuoteToken, currentQuote.getCloseQuote());
}
}
else if (token instanceof OpenQuoteToken)
{
final OpenQuoteToken openQuoteToken = (OpenQuoteToken) token;
if (openQuoteToken.isSurpressQuoteText())
{
quoteLevel += 1;
return null;
}
// Important: The quote level must be increased after the quote has
// been queried. Our quoting implementation uses zero-based arrays.
final QuotesPair currentQuote = getQuotesPair();
quoteLevel += 1;
if (currentQuote != null)
{
return new ResolvedStringToken
(openQuoteToken, currentQuote.getOpenQuote());
}
}
else if (token instanceof VariableToken)
{
final VariableToken variableToken = (VariableToken) token;
final String resolvedText =
currentElement.getString(variableToken.getVariable());
return new ResolvedStringToken(variableToken, resolvedText);
}
else if (token instanceof CounterToken)
{
final CounterToken counterToken = (CounterToken) token;
final String name = counterToken.getName();