mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
cleanup ITokenTypeRemapper
GitOrigin-RevId: 8c2fd80bbef25892ac0c2a6c593c4601124fdf23
This commit is contained in:
committed by
intellij-monorepo-bot
parent
841d9340a3
commit
e26bd43692
@@ -15,6 +15,7 @@ import com.jetbrains.python.psi.FutureFeature;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.PyElementType;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.EnumSet;
|
||||
@@ -1080,11 +1081,15 @@ public class StatementParsing extends Parsing implements ITokenTypeRemapper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IElementType filter(final IElementType source, final int start, final int end, final CharSequence text) {
|
||||
public @NotNull IElementType filter(@NotNull IElementType source, int start, int end, @NotNull CharSequence text) {
|
||||
return filter(source, start, end, text, true);
|
||||
}
|
||||
|
||||
protected IElementType filter(final IElementType source, final int start, final int end, final CharSequence text, boolean checkLanguageLevel) {
|
||||
protected @NotNull IElementType filter(@NotNull IElementType source,
|
||||
int start,
|
||||
int end,
|
||||
@NotNull CharSequence text,
|
||||
boolean checkLanguageLevel) {
|
||||
if (source == PyTokenTypes.IDENTIFIER && isWordAtPosition(text, start, end, TOK_AS)) {
|
||||
return PyTokenTypes.AS_KEYWORD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user