cli20 0.1.2
A C++20 typed-schema command-line parser
Loading...
Searching...
No Matches
cli::Token Struct Reference

A single token produced by tokenize(). More...

#include <parser.hh>

Public Attributes

std::string_view text
 For option tokens: the bare name without prefix (e.g.
std::size_t position
 Zero-based index into the original args span.
std::uint8_t prefix
TokenType type
 Classification of this token.

Detailed Description

A single token produced by tokenize().

Definition at line 174 of file parser.hh.

Member Data Documentation

◆ position

std::size_t cli::Token::position

Zero-based index into the original args span.

Definition at line 179 of file parser.hh.

◆ prefix

std::uint8_t cli::Token::prefix

Definition at line 180 of file parser.hh.

◆ text

std::string_view cli::Token::text

For option tokens: the bare name without prefix (e.g.

"verbose" for --verbose, "v" for -v). For value/positional/command tokens: the raw text from the args span.

Definition at line 175 of file parser.hh.

◆ type

TokenType cli::Token::type

Classification of this token.

Definition at line 182 of file parser.hh.


The documentation for this struct was generated from the following file: