In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.RequiredWhitespaceParser

Consume one or more whitespace characters from the input.

Predicts true when:

  • there is remaining input
  • there is input remaining and the next character is whitespace

Parsing stops when:

  • the next character is not whitespace
  • there is no more input remaining

Parsing fails when:

  • there is no more input remaining

Constructors

constructor(name: String = "")

Consume one or more whitespace characters from the input.

Predicts true when:

  • there is remaining input
  • there is input remaining and the next character is whitespace

Parsing stops when:

  • the next character is not whitespace
  • there is no more input remaining

Parsing fails when:

  • there is no more input remaining

Parameters:
  • name: String = ""

Methods

fun predict(input: ParserContext): Boolean

Parameters:
fun parse(input: ParserContext): <Node, ParserContext>

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: