|
wex v25.10.0
|
This class offers the ex command parser. More...
#include <wex/ex/command-parser.h>
Public Types | |
| enum class | address_t { NO_ADDR , ONE_ADDR , TWO_ADDR } |
| The possible ex address types. More... | |
| enum class | parse_t { PARSE , CHECK } |
| The possible ex parse types. More... | |
Public Member Functions | |
| command_parser (ex *ex, const std::string &text=std::string(), parse_t type=parse_t::PARSE) | |
| Constructor. | |
| auto & | command () const |
| The command. | |
| bool | is_ok () const |
| Returns true if parsing was ok. | |
| auto & | range () const |
| The range. | |
| auto & | text () const |
| The text (rest), not the original supplied text. | |
| auto | type () const |
| The type that is parsed. | |
This class offers the ex command parser.
|
strong |
|
strong |
| wex::command_parser::command_parser | ( | ex * | ex, |
| const std::string & | text = std::string(), | ||
| parse_t | type = parse_t::PARSE ) |
Constructor.
| ex | the ex component |
| text | provide the complete ex command (after colon), e.g. "5p".
|
| type | specify whether to parse text only (CHECK) or continue parsing address or addressrange (PARSE) |
|
inline |
The command.
mostly a one letter string like "z" for adjust_window mostly a one letter string like "p" for print