57 sCommandLine.replace(pos, iter->first.length(), iter->second);
58 pos += iter->second.length();
80 for (std::string symdef : symdefs)
82 size_t pos = symdef.find(
":=");
84 if (pos != std::string::npos)
86 std::string symbol = symdef.substr(0, pos);
87 std::string definition = symdef.substr(pos+2);
95 if (definition.back() ==
';')
97 definition.pop_back();
101 if (symbol.length() && definition.length() && symbol != definition)
This class extends the std::vector for endlessness.
void resolveSymbols(std::string &sCommandLine) const
Resolve all file-static constant declarations in the current line.
void clear()
Remove all file-static constant declarations.
bool isSymbol(const std::string &sSymbol) const
Check, whether the passed string is a defined symbol (will be used by the static code analyzer).
void createSymbol(const std::string &sCommandLine)
Create one or more new file-static constant declarations for the current file.
std::map< std::string, std::string > m_symDefs
size_t findVariableInExpression(const std::string &sExpr, const std::string &sVarName, size_t nPosStart)
This function searches for the selected variable in the passed string and returns the position of the...
void StripSpaces(std::string &)
Removes leading and trailing white spaces and tabulator characters.