AstNodeMethods

final
class AstNodeMethods(val node: AstNode) extends AnyVal with NodeExtension
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def ast: Traversal[AstNode]

Nodes of the AST rooted in this node, including the node itself.

Nodes of the AST rooted in this node, including the node itself.

def astParent: AstNode
def depth: Int
def depth(p: AstNode => Boolean): Int

The depth of the AST rooted in this node. Upon walking the tree to its leaves, the depth is only increased for nodes where p(node) is true.

The depth of the AST rooted in this node. Upon walking the tree to its leaves, the depth is only increased for nodes where p(node) is true.

def isBlock: Boolean
def isCall: Boolean
def isControlStructure: Boolean

Indicate whether the AST node represents a control structure, e.g., if, for, while.

Indicate whether the AST node represents a control structure, e.g., if, for, while.

def isExpression: Boolean
def isFieldIdentifier: Boolean
def isFile: Boolean
def isIdentifier: Boolean
def isLiteral: Boolean
def isLocal: Boolean
def isMember: Boolean
def isMethod: Boolean
def isMethodRef: Boolean
def isModifier: Boolean
def isNamespaceBlock: Boolean
def isParameter: Boolean
def isReturn: Boolean
def isTypeDecl: Boolean

Concrete fields

val node: AstNode