In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.MaybeParser

Maybe consume input from its parser. If its parser predicts true, it is expected to parse successfully.

Predicts true when:

  • always

Parsing fails when:

  • its parser fails to parse

Fields

parser: Parser

Constructors

constructor(parser: Parser, name: String = "")

Maybe consume input from its parser. If its parser predicts true, it is expected to parse successfully.

Predicts true when:

  • always

Parsing fails when:

  • its parser fails to parse

Parameters:
  • parser: Parser
  • name: String = ""

Methods

fun predict(input: ParserContext): Boolean

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

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: