data: Fixes and features for loading Coati into Coati

This change facilitates loading Coati into Coati:
* removed error logs for TokenComponent setting
* fixed edge checks regarding template stuff
* separated CommonSettings to be inherited by Project- and ApplicationSettings for common settings
* pluralized SourcePaths setting in xml to allow for loading multiple directories and single files
* added CompilerFlags section to settings
* passing Compiler arguments to Parser via struct Parser::Arguments
* setting -isystem for all header search paths to avoid distinction between "" and <> headers
* parsing all headers from the SourcePaths, even the ones that are not included
* fixed parsing time measurement and display
* added utility.h file for general utility functionality
This commit is contained in:
Eberhard Graether
2015-03-16 10:07:57 +01:00
parent 0e0553c90b
commit 03cf9eeb5f
44 changed files with 442 additions and 260 deletions
+28 -2
View File
@@ -29,9 +29,24 @@ const std::vector<FilePath>& FileRegister::getSourceFilePaths() const
return m_sourceFilePaths;
}
bool FileRegister::includeFileIsParsing(const std::string& filePath) const
std::vector<FilePath> FileRegister::getUnparsedIncludeFilePaths() const
{
std::map<FilePath, ParseState>::const_iterator it = m_includeFilePaths.find(FilePath(filePath));
std::vector<FilePath> filePaths;
for (std::pair<FilePath, ParseState>&& p : m_includeFilePaths)
{
if (p.second == STATE_UNPARSED)
{
filePaths.push_back(p.first);
}
}
return filePaths;
}
bool FileRegister::includeFileIsParsing(const FilePath& filePath) const
{
std::map<FilePath, ParseState>::const_iterator it = m_includeFilePaths.find(filePath);
if (it == m_includeFilePaths.end())
{
return false;
@@ -40,6 +55,17 @@ bool FileRegister::includeFileIsParsing(const std::string& filePath) const
return it->second == STATE_PARSING;
}
bool FileRegister::includeFileIsParsed(const FilePath& filePath) const
{
std::map<FilePath, ParseState>::const_iterator it = m_includeFilePaths.find(filePath);
if (it == m_includeFilePaths.end())
{
return false;
}
return it->second == STATE_PARSED;
}
void FileRegister::markIncludeFileParsing(const std::string& filePath)
{
std::map<FilePath, ParseState>::iterator it = m_includeFilePaths.find(FilePath(filePath));