@Override
public void visitFunction(final Function function) {
setHighlighting(function, myHolder, MathematicaSyntaxHighlighterColors.ANONYMOUS_FUNCTION);
PsiElementVisitor patternVisitor = new MathematicaVisitor() {
@Override
public void visitElement(PsiElement element) {
element.acceptChildren(this);
}
@Override
public void visitSymbol(Symbol symbol) {
if (MathematicaElementTypes.SLOTS.contains(symbol.getNode().getFirstChildNode().getElementType())) {
setHighlighting(symbol, myHolder, MathematicaSyntaxHighlighterColors.PATTERN);
}
}
};
patternVisitor.visitElement(function);
}