// when called for a specific parser rule, its hidden() spec (if any) is made current
// otherwise the hidden() spec of the grammar is made current.
// (There is no real way to calculate the calling chain to a particular starting parser rule)
//
if(context instanceof ParserRule) {
ParserRule pr = (ParserRule) context;
if(pr.isDefinesHiddenTokens())
currentHidden = pr.getHiddenTokens();
else {
Grammar grammar = GrammarUtil.getGrammar(context);
currentHidden = grammar.getHiddenTokens();
}
// TODO: Verify this is correct