mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
parent
4101ff314a
commit
db9866677e
4
include/external/clara.h
vendored
4
include/external/clara.h
vendored
@ -554,12 +554,13 @@ namespace Clara {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void parseIntoTokens( std::string const& arg, std::vector<Token>& tokens ) {
|
void parseIntoTokens( std::string const& arg, std::vector<Token>& tokens ) {
|
||||||
for( std::size_t i = 0; i <= arg.size(); ++i ) {
|
for( std::size_t i = 0; i < arg.size(); ++i ) {
|
||||||
char c = arg[i];
|
char c = arg[i];
|
||||||
if( c == '"' )
|
if( c == '"' )
|
||||||
inQuotes = !inQuotes;
|
inQuotes = !inQuotes;
|
||||||
mode = handleMode( i, c, arg, tokens );
|
mode = handleMode( i, c, arg, tokens );
|
||||||
}
|
}
|
||||||
|
mode = handleMode( arg.size(), '\0', arg, tokens );
|
||||||
}
|
}
|
||||||
Mode handleMode( std::size_t i, char c, std::string const& arg, std::vector<Token>& tokens ) {
|
Mode handleMode( std::size_t i, char c, std::string const& arg, std::vector<Token>& tokens ) {
|
||||||
switch( mode ) {
|
switch( mode ) {
|
||||||
@ -592,6 +593,7 @@ namespace Clara {
|
|||||||
default: from = i; return ShortOpt;
|
default: from = i; return ShortOpt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Mode handleOpt( std::size_t i, char c, std::string const& arg, std::vector<Token>& tokens ) {
|
Mode handleOpt( std::size_t i, char c, std::string const& arg, std::vector<Token>& tokens ) {
|
||||||
if( std::string( ":=\0", 3 ).find( c ) == std::string::npos )
|
if( std::string( ":=\0", 3 ).find( c ) == std::string::npos )
|
||||||
return mode;
|
return mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user