| 300 | } |
| 301 | |
| 302 | bool cmListFileParser::AddArgument(cmListFileLexer_Token* token, |
| 303 | cmListFileArgument::Delimiter delim) |
| 304 | { |
| 305 | this->FunctionArguments.emplace_back( |
| 306 | cm::string_view(token->text, token->length), delim, token->line); |
| 307 | if (this->Separation == SeparationOkay) { |
| 308 | return true; |
| 309 | } |
| 310 | bool isError = (this->Separation == SeparationError || |
| 311 | delim == cmListFileArgument::Bracket); |
| 312 | cmListFileContext lfc; |
| 313 | lfc.FilePath = this->FileName; |
| 314 | lfc.Line = token->line; |
| 315 | cmListFileBacktrace lfbt = this->Backtrace; |
| 316 | lfbt = lfbt.Push(lfc); |
| 317 | auto msg = |
| 318 | cmStrCat("Syntax ", (isError ? "Error" : "Warning"), |
| 319 | " in cmake code at column ", token->column, |
| 320 | "\n" |
| 321 | "Argument not separated from preceding token by whitespace."); |
| 322 | if (isError) { |
| 323 | this->Messenger->IssueMessage(MessageType::FATAL_ERROR, msg, lfbt); |
| 324 | return false; |
| 325 | } |
| 326 | this->Messenger->IssueMessage(MessageType::AUTHOR_WARNING, msg, lfbt); |
| 327 | return true; |
| 328 | } |
| 329 | |
| 330 | cm::optional<cmListFileContext> cmListFileParser::CheckNesting() const |
| 331 | { |
no test coverage detected