ParserResult

sealed class ParserResult<T>

Result of a parsing pass

Parameters

T

The resulting root object this parser produces.

Inheritors

Types

Link copied to clipboard
class Failure<T>(val reason: String, debuggerResult: String) : NiwenParser.ParserResult<T>

Failed parser result. You can usually get a more in-depth analysis by enabling the debugger and getting the ParserResult.debuggerResult

Link copied to clipboard
class Success<T>(val result: T, debuggerResult: String) : NiwenParser.ParserResult<T>

Successful parser result.

Properties

Link copied to clipboard

The resulting YAML from the debugger if enabled, or a short message which indicates that the debugger was disabled

Functions

Link copied to clipboard
abstract fun orThrow(): T

Return the object wrapped by this