From c51ed166887aab4e61f2ad32b1c39037a3ea2f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Tr=C3=A1vn=C3=AD=C4=8Dek?= <jan.travnicek@fit.cvut.cz> Date: Fri, 8 Apr 2022 22:28:34 +0200 Subject: [PATCH] cli: allow string template argument in cli closes #228 --- alib2cli/src/parser/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alib2cli/src/parser/Parser.cpp b/alib2cli/src/parser/Parser.cpp index 51a8c205bf..123e3e5eee 100644 --- a/alib2cli/src/parser/Parser.cpp +++ b/alib2cli/src/parser/Parser.cpp @@ -106,6 +106,8 @@ std::unique_ptr < Arg > Parser::arg ( ) { std::string value = getTokenValue ( ); match ( cli::Lexer::TokenType::UNSIGNED, cli::Lexer::TokenType::IDENTIFIER ); return std::make_unique < BindedArg > ( std::move ( value ) ); + } else if ( check ( cli::Lexer::TokenType::STRING ) ) { + return std::make_unique < ImmediateArg > ( matchString ( ) ); } else { std::string value = matchIdentifier ( ); return std::make_unique < ImmediateArg > ( value ); -- GitLab