Source-highlight Library
|
represent a string for a language definition file's element More...
#include <stringdef.h>
Public Member Functions | |
StringDef (const std::string &s, const std::string &o) | |
constructs a StringDef and store also the original representation More... | |
StringDef (const std::string &s, bool doubleQuotes=false) | |
constructs a StringDef and record whether it comes from a double quoted string. More... | |
const std::string | toString () const |
return the string representation (after preprocessing) More... | |
const std::string | toStringOriginal () const |
return the original representation (without any preprocessing); this is useful for printing errors More... | |
bool | isDoubleQuoted () const |
whether this comes from a double quoted string More... | |
bool | hasBackRef () const |
void | setBackRef (bool b) |
Static Public Member Functions | |
static StringDef * | concat (const StringDef *s1, const StringDef *s2) |
Given two StringDef produces a new StringDef (keeping properties such as hasBackRef) More... | |
Private Attributes | |
std::string | stringdef |
the actual content | |
std::string | orig |
the original representation (without any preprocessing) | |
bool | doubleQuotedString |
whether the string was specified with double quotes | |
bool | hasBackRef_ |
whether this is contains a back reference to a matched subexpression | |
represent a string for a language definition file's element
|
inline |
constructs a StringDef and store also the original representation
s | the actual content |
o | the original representation |
|
inline |
constructs a StringDef and record whether it comes from a double quoted string.
s | the actual content |
doubleQuotes |
|
inline |
|
inline |
whether this comes from a double quoted string
|
inline |
b |
const std::string srchilite::StringDef::toString | ( | ) | const |
return the string representation (after preprocessing)
|
inline |
return the original representation (without any preprocessing); this is useful for printing errors