void (@NotNull LighterAST tree, @NotNull LighterASTNode node, @NotNull StringBuilder buffer, @Nullable TokenSet skipTypes) { if (skipTypes != null && skipTypes.contains(node.getTokenType())) { return; } if (node instanceof LighterASTTokenNode) { buffer.append(((LighterASTTokenNode)node).getText()); return; } if (node instanceof LighterLazyParseableNode) { buffer.append(((LighterLazyParseableNode)node).getText()); return; } List<LighterASTNode> children = tree.getChildren(node); for (int i = 0, size = children.size(); i < size; ++i) { toBuffer(tree, children.get(i), buffer, skipTypes); } }