mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Make visit methods internal
This commit is contained in:
@@ -14,11 +14,11 @@ fun validateIdentifier(id: String) {
|
||||
require(id.matches(identifierRegex), { "id must match [aA-zZ]+([-][aA-zZ]+)*" })
|
||||
}
|
||||
|
||||
fun ASTNode.visitTokens(currentNode: (node: ASTNode) -> Unit) {
|
||||
internal fun ASTNode.visitTokens(currentNode: (node: ASTNode) -> Unit) {
|
||||
currentNode(this)
|
||||
getChildren(null).forEach { it.visitTokens(currentNode) }
|
||||
}
|
||||
|
||||
fun ASTNode.visit(visitor: DetektVisitor) {
|
||||
internal fun ASTNode.visit(visitor: DetektVisitor) {
|
||||
KtPsiUtil.visitChildren(this.psi as KtElement, visitor, null)
|
||||
}
|
||||
Reference in New Issue
Block a user