represent a string for a language definition file's element
More...
#include <stringdef.h>
|
| StringDef (const std::string &s, const std::string &o) |
| constructs a StringDef and store also the original representation
|
|
| StringDef (const std::string &s, bool doubleQuotes=false) |
| constructs a StringDef and record whether it comes from a double quoted string.
|
|
const std::string | toString () const |
| return the string representation (after preprocessing)
|
|
const std::string | toStringOriginal () const |
| return the original representation (without any preprocessing); this is useful for printing errors
|
|
bool | isDoubleQuoted () const |
| whether this comes from a double quoted string
|
|
bool | hasBackRef () const |
|
void | setBackRef (bool b) |
|
|
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
◆ StringDef() [1/2]
srchilite::StringDef::StringDef |
( |
const std::string & |
s, |
|
|
const std::string & |
o |
|
) |
| |
|
inline |
constructs a StringDef and store also the original representation
- Parameters
-
s | the actual content |
o | the original representation |
◆ StringDef() [2/2]
srchilite::StringDef::StringDef |
( |
const std::string & |
s, |
|
|
bool |
doubleQuotes = false |
|
) |
| |
|
inline |
constructs a StringDef and record whether it comes from a double quoted string.
- Parameters
-
s | the actual content |
doubleQuotes | |
◆ concat()
◆ hasBackRef()
bool srchilite::StringDef::hasBackRef |
( |
| ) |
const |
|
inline |
- Returns
- whether this has a back reference
◆ isDoubleQuoted()
bool srchilite::StringDef::isDoubleQuoted |
( |
| ) |
const |
|
inline |
whether this comes from a double quoted string
- Returns
- whether this comes from a double quoted string
◆ setBackRef()
void srchilite::StringDef::setBackRef |
( |
bool |
b | ) |
|
|
inline |
◆ toString()
const std::string srchilite::StringDef::toString |
( |
| ) |
const |
return the string representation (after preprocessing)
- Returns
- the string representation
◆ toStringOriginal()
const std::string srchilite::StringDef::toStringOriginal |
( |
| ) |
const |
|
inline |
return the original representation (without any preprocessing); this is useful for printing errors
- Returns
- the original representation
The documentation for this class was generated from the following files: