In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.WordNode

Fields

text: String

Constructors

constructor(word: String, name: String, context: NodeContext)

Parameters:

Extensions

fun find(nodeClass: KClass<Node>?, nodeName: String? = null): Node

Finds the first matching node by class and name in the immediate children of this node. Throws {@link VisitorException} if this node is a {@link TerminalNode} or if no child nodes match the query.

Parameters:
  • nodeClass: KClass
  • nodeName: String = null
inline fun find(nodeName: String? = null): T

Parameters:
  • nodeName: String = null
fun has(nodeClass: KClass<Node>?, nodeName: String? = null): Boolean

Parameters:
  • nodeClass: KClass
  • nodeName: String = null
fun findAnywhere(nodeClass: KClass<Node>?, nodeName: String? = null): Node

Finds the first matching node by class and name in any child of this node. Throws {@link VisitorException} if this node is a {@link TerminalNode} or if no child nodes match the query.

Parameters:
  • nodeClass: KClass
  • nodeName: String = null
inline fun findAnywhere(nodeName: String? = null): T

Parameters:
  • nodeName: String = null
fun hasAnywhere(nodeClass: KClass<Node>?, nodeName: String? = null): Boolean

Parameters:
  • nodeClass: KClass
  • nodeName: String = null
fun visit(context: T, visitors: Visitor<T>): T

Parameters: