Make a substring from the command text being parsed.
| 191 | |
| 192 | // Make a substring from the command text being parsed. |
| 193 | string Parser::makeParseStr(const Position& p1, const Position& p2) |
| 194 | { |
| 195 | const char* start = p1.leadingFirstPos; |
| 196 | const char* end = p2.trailingLastPos; |
| 197 | |
| 198 | string str; |
| 199 | transformString(start, end - start, str); |
| 200 | str.trim(" \t\r\n"); |
| 201 | |
| 202 | string ret; |
| 203 | |
| 204 | if (DataTypeUtil::convertToUTF8(str, ret)) |
| 205 | return ret; |
| 206 | |
| 207 | return str; |
| 208 | } |
| 209 | |
| 210 | |
| 211 | // Make parameter node. |