From 4b84c125dc5e858c017f2af2d83c5cebd7de3ef8 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Fri, 6 Dec 2013 17:21:55 +0400 Subject: [PATCH] CSS: extract methods for skipping lazy parseble elements --- .../indentation/AbstractIndentParser.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/indentation/AbstractIndentParser.java b/platform/lang-impl/src/com/intellij/indentation/AbstractIndentParser.java index 310f3f025f17..a298b73fda23 100644 --- a/platform/lang-impl/src/com/intellij/indentation/AbstractIndentParser.java +++ b/platform/lang-impl/src/com/intellij/indentation/AbstractIndentParser.java @@ -1,9 +1,23 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.indentation; import com.intellij.lang.ASTNode; import com.intellij.lang.PsiBuilder; import com.intellij.lang.PsiParser; -import com.intellij.psi.TokenType; import com.intellij.psi.tree.IElementType; import com.intellij.psi.tree.TokenSet; import com.intellij.util.containers.HashMap; @@ -114,7 +128,7 @@ public abstract class AbstractIndentParser implements PsiParser { } protected static boolean tokenIn(@Nullable final IElementType elementType, @NotNull final TokenSet tokenSet) { - return tokenIn(elementType, tokenSet.getTypes()); + return tokenSet.contains(elementType); } @NotNull