* @brief Expression parser: extract one comparison operation */
| 391 | * @brief Expression parser: extract one comparison operation |
| 392 | */ |
| 393 | static PropertySelectorBase * |
| 394 | extract_base (tl::Extractor &ex) |
| 395 | { |
| 396 | bool eq = true; |
| 397 | tl::Variant n, v; |
| 398 | ex.read (n); |
| 399 | if (ex.test ("==")) { |
| 400 | eq = true; |
| 401 | } else if (ex.test ("!=")) { |
| 402 | eq = false; |
| 403 | } else { |
| 404 | ex.error (tl::to_string (tr ("'==' or '!=' operator expected"))); |
| 405 | } |
| 406 | ex.read (v); |
| 407 | return new PropertySelectorEqual (n, v, eq); |
| 408 | } |
| 409 | |
| 410 | /** |
| 411 | * @brief Expression parser: parse complex elements (bracketed expressions) |