mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 20:00:46 +07:00
GitOrigin-RevId: cab7298c1babe62754272d529bd4e471cf3b17c6
15 lines
423 B
Java
15 lines
423 B
Java
import com.intellij.lang.ParserDefinition;
|
|
import com.intellij.psi.tree.TokenSet;
|
|
import com.example.MyLangTokenTypes;
|
|
|
|
public class ParserDefinitionWithLegalTokenSetInitializedLazilyInMethod implements ParserDefinition {
|
|
private TokenSet comments;
|
|
@Override
|
|
public TokenSet getCommentTokens() {
|
|
if (comments == null) {
|
|
comments = TokenSet.create(MyLangTokenTypes.COMMENT);
|
|
}
|
|
return comments;
|
|
}
|
|
}
|