summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-06 14:07:58 (GMT)
committerBrad King <brad.king@kitware.com>2013-08-08 17:26:27 (GMT)
commit0546484e4b7856c417f30a5b8ff6af6a5a080f0d (patch)
tree3ef8308e1115129bf5777a65a0525b0e81ff58e4 /Source/cmListFileCache.cxx
parent28685ade7a8f60e8519b6bf8a824e6a01365c181 (diff)
downloadCMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.zip
CMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.tar.gz
CMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.tar.bz2
cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
Replace the boolean value that indicates whether an argument is unquoted or quoted with a generalized enumeration of possible argument types. For now "Quoted" and "Unquoted" remain the only types.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 36d84f3..7b25351 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -196,7 +196,8 @@ bool cmListFile::ParseFile(const char* filename,
{
cmListFileFunction project;
project.Name = "PROJECT";
- cmListFileArgument prj("Project", false, filename, 0);
+ cmListFileArgument prj("Project", cmListFileArgument::Unquoted,
+ filename, 0);
project.Arguments.push_back(prj);
this->Functions.insert(this->Functions.begin(),project);
}
@@ -243,8 +244,8 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
if(token->type == cmListFileLexer_Token_ParenLeft)
{
parenDepth++;
- cmListFileArgument a("(",
- false, filename, token->line);
+ cmListFileArgument a("(", cmListFileArgument::Unquoted,
+ filename, token->line);
function.Arguments.push_back(a);
}
else if(token->type == cmListFileLexer_Token_ParenRight)
@@ -254,21 +255,21 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
return true;
}
parenDepth--;
- cmListFileArgument a(")",
- false, filename, token->line);
+ cmListFileArgument a(")", cmListFileArgument::Unquoted,
+ filename, token->line);
function.Arguments.push_back(a);
}
else if(token->type == cmListFileLexer_Token_Identifier ||
token->type == cmListFileLexer_Token_ArgumentUnquoted)
{
- cmListFileArgument a(token->text,
- false, filename, token->line);
+ cmListFileArgument a(token->text, cmListFileArgument::Unquoted,
+ filename, token->line);
function.Arguments.push_back(a);
}
else if(token->type == cmListFileLexer_Token_ArgumentQuoted)
{
- cmListFileArgument a(token->text,
- true, filename, token->line);
+ cmListFileArgument a(token->text, cmListFileArgument::Quoted,
+ filename, token->line);
function.Arguments.push_back(a);
}
else if(token->type != cmListFileLexer_Token_Newline)