Tokenizer (PsiElement element) { IElementType elementType = element.getNode().getElementType(); if (elementType == RestTokenTypes.FIELD || elementType == RestTokenTypes.CUSTOM_DIRECTIVE || elementType == RestTokenTypes.REST_DJANGO_INJECTION || elementType == RestTokenTypes.REST_INJECTION) { return EMPTY_TOKENIZER; } if (element instanceof LeafPsiElement && element.getLanguage() == RestLanguage.INSTANCE) { return REST_ELEMENT_TOKENIZER; } return EMPTY_TOKENIZER; }