private static @Nullable CharSequence getTextFromNode(@NotNull LighterASTNode node, @Nullable TokenSet skipTypes) {
    if (node instanceof LighterASTTokenNode) {
      return ((LighterASTTokenNode)node).getText();
    }
    if (node instanceof LighterLazyParseableNode) {
      return ((LighterLazyParseableNode)node).getText();
    }
    // LighterASTSyntaxTreeBuilderBackedNode instances can be composite nodes. Therefore, when there
    // are tokens that should be filtered, we should not return the text directly.
    boolean filterTokens = skipTypes != null && skipTypes != TokenSet.EMPTY;
    if (!filterTokens && node instanceof LighterASTSyntaxTreeBuilderBackedNode) {
      return ((LighterASTSyntaxTreeBuilderBackedNode)node).getText();
    }
    return null;
  }
private static @Nullable CharSequence getTextFromNode(@NotNull LighterASTNode node, @Nullable TokenSet skipTypes)