IElementType () { final IElementType tokenType = super.getTokenType(); if (PyTokenTypes.STRING_NODES.contains(tokenType)) { return convertStringType(tokenType, getTokenText(), myLanguageLevel, hasUnicodeImport); } if (tokenType == PyTokenTypes.IDENTIFIER) { final String tokenText = getTokenText(); if (tokenText.equals(PyNames.WITH)) return PyTokenTypes.WITH_KEYWORD; if (tokenText.equals(PyNames.AS)) return PyTokenTypes.AS_KEYWORD; if (myLanguageLevel.hasPrintStatement() && !hasPrintFunctionImport) { if (tokenText.equals(PyNames.PRINT)) return PyTokenTypes.PRINT_KEYWORD; } if (myLanguageLevel.isPy3K()) { if (tokenText.equals(PyNames.NONE)) return PyTokenTypes.NONE_KEYWORD; if (tokenText.equals(PyNames.TRUE)) return PyTokenTypes.TRUE_KEYWORD; if (tokenText.equals(PyNames.FALSE)) return PyTokenTypes.FALSE_KEYWORD; if (tokenText.equals(PyNames.NONLOCAL)) return PyTokenTypes.NONLOCAL_KEYWORD; if (tokenText.equals(PyNames.DEBUG)) return PyTokenTypes.DEBUG_KEYWORD; if (myLanguageLevel.isAtLeast(LanguageLevel.PYTHON37)) { if (tokenText.equals(PyNames.ASYNC)) return PyTokenTypes.ASYNC_KEYWORD; if (tokenText.equals(PyNames.AWAIT)) return PyTokenTypes.AWAIT_KEYWORD; } } else if (tokenText.equals(PyNames.EXEC)) { return PyTokenTypes.EXEC_KEYWORD; } } return tokenType; }