19#ifndef STRINGEXPRESSION_HPP
20#define STRINGEXPRESSION_HPP
23#include "../utils/tools.hpp"
66 if (!eq_pos || eq_pos >=
sLine.length())
69 return sLine[eq_pos - 1] !=
'!' &&
sLine[eq_pos - 1] !=
'<' &&
sLine[eq_pos - 1] !=
'>' &&
sLine[eq_pos + 1] !=
'=' &&
sLine[eq_pos - 1] !=
'=';
91 if (
sLine.find(
'=') == std::string::npos)
98 for (
size_t i = 0; i <
sLine.length(); i++)
100 if (
sLine[i] ==
'"' && (!i ||
sLine[i-1] !=
'\\'))
unsigned int getMatchingParenthesis(const StringView &)
Returns the position of the closing parenthesis.
void StripSpaces(std::string &)
Removes leading and trailing white spaces and tabulator characters.
This struct encodes a string expression. It tracks the position of an equal sign in the expression in...
void split()
Splits expression and its assignee and sets the assignment operator position to 0.
void findAssignmentOperator()
Searches for the assignment operator (the equal sign separating expression and assignee)....
bool isAssignmentOperator(size_t eq_pos) const
This member function determines, whether the equal sign at eq_pos is an assignment operator and no bo...
StringExpression(std::string &_sLine, const std::string &sCache="")
Constructor of this structure. Searches for the equal sign upon construction.