* @returns If the given expression is a constant string, its address. nullptr on failure. */
| 238 | * @returns If the given expression is a constant string, its address. nullptr on failure. |
| 239 | */ |
| 240 | const String * ApplyRule::GetConstString(Expression* exp, const Dictionary::Ptr& constants) |
| 241 | { |
| 242 | auto cnst (GetConst(exp, constants)); |
| 243 | |
| 244 | return cnst && cnst->IsString() ? &cnst->Get<String>() : nullptr; |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * @returns If the given expression is a constant, its address. nullptr on failure. |