diff --git a/platform/core-api/src/com/intellij/psi/tree/ILazyParseableElementTypeBase.java b/platform/core-api/src/com/intellij/psi/tree/ILazyParseableElementTypeBase.java index b4bb91858a1d..85d5d7712fd1 100644 --- a/platform/core-api/src/com/intellij/psi/tree/ILazyParseableElementTypeBase.java +++ b/platform/core-api/src/com/intellij/psi/tree/ILazyParseableElementTypeBase.java @@ -34,6 +34,11 @@ public interface ILazyParseableElementTypeBase { */ ASTNode parseContents(@NotNull ASTNode chameleon); + /** + * @return whether it's safe during lazy parsing to reuse tokens that were previously collapsed into a single token of this + * type via {@link com.intellij.lang.PsiBuilder.Marker#collapse}. This can increase lazy-parsing speed + * (by not having to run the lexer again), but requires additional memory to store the tokens. + */ default boolean reuseCollapsedTokens() { return false; }