jcli.commandparser.parser

Undocumented in source.

Members

Enums

CommandParsingErrorCode
enum CommandParsingErrorCode

This is needed mostly for testing purposes

ConsumeSingleArgumentResultKind
enum ConsumeSingleArgumentResultKind

Reserved for later use, but kinda serves no purpose right now. This return value should be ignored for now.

Functions

consumeSingleArgumentIntoCommand
ConsumeSingleArgumentResultKind consumeSingleArgumentIntoCommand(Context context, CommandType command, TArgTokenizer tokenizer, TErrorHandler errorHandler)

Consumes one or more tokens from the given tokenizer, Will overconsume positional and orphan arguments.

createErrorCodeHandler
ErrorCodeHandler createErrorCodeHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
createIgnoreSetErrorHandler
IgnoreSetErrorHandler createIgnoreSetErrorHandler(ErrorCode ignored)
Undocumented in source. Be warned that the author may not have intended to support it.
createInMemoryErrorHandler
InMemoryErrorHandler createInMemoryErrorHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
maybeReportParseErrorsFromFinalContext
void maybeReportParseErrorsFromFinalContext(Context context, TErrorHandler errorHandler)
Undocumented in source. Be warned that the author may not have intended to support it.
resetNamedArgumentArrayStorage
void resetNamedArgumentArrayStorage(Context context)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixin templates

ParseBoilerplate
mixintemplate ParseBoilerplate(Struct)
Undocumented in source.

Structs

CommandParsingContext
struct CommandParsingContext(size_t numBitsInStorage)
Undocumented in source.
DefaultParseErrorHandler
struct DefaultParseErrorHandler
Undocumented in source.
ErrorCodeHandler
struct ErrorCodeHandler
Undocumented in source.
IgnoreSetErrorHandler
struct IgnoreSetErrorHandler
Undocumented in source.
InMemoryErrorHandler
struct InMemoryErrorHandler
Undocumented in source.
ParseResult
struct ParseResult(CommandType)

The errors are always recorded (or ignored) via a handler object.

Templates

parseCommand
template parseCommand(CommandType, alias bindArgument = jcli.argbinder.bindArgument!())

For now, I opt to keep the parts separate, because then the code is more parametrizable. Currently, it's not totally clear which parts of this are needed separately.

Meta