| 17 | #include <QVector> |
| 18 | |
| 19 | struct CMakeFunctionArgument |
| 20 | { |
| 21 | CMakeFunctionArgument() {} |
| 22 | explicit CMakeFunctionArgument(const QString& v); |
| 23 | CMakeFunctionArgument(const QString& v, bool q, quint32 l = 0, quint32 c=0); |
| 24 | inline bool operator == (const CMakeFunctionArgument& r) const |
| 25 | { |
| 26 | return (this->value == r.value) && (this->quoted == r.quoted); |
| 27 | } |
| 28 | |
| 29 | inline bool operator != (const CMakeFunctionArgument& r) const |
| 30 | { |
| 31 | return (this->value != r.value) || (this->quoted != r.quoted); |
| 32 | } |
| 33 | |
| 34 | bool operator==( const QString& rhs ) |
| 35 | { |
| 36 | return ( this->value == rhs ); |
| 37 | } |
| 38 | |
| 39 | bool isCorrect() const { return column>0; } |
| 40 | |
| 41 | static QString unescapeValue(const QString& value); |
| 42 | |
| 43 | KDevelop::RangeInRevision range() const |
| 44 | { return KDevelop::RangeInRevision(line-1, column-1, line-1, column+value.length()-1); } |
| 45 | |
| 46 | bool isValid() const { return quoted || !value.isEmpty(); } |
| 47 | |
| 48 | QString value; |
| 49 | bool quoted = false; |
| 50 | quint32 line = 0; |
| 51 | quint32 column = 0; |
| 52 | static const QMap<QChar, QChar> scapings; |
| 53 | }; |
| 54 | Q_DECLARE_METATYPE( CMakeFunctionArgument ) |
| 55 | |
| 56 |
no outgoing calls
no test coverage detected