| 506 | }; |
| 507 | |
| 508 | int ParseFlagExpressionString(FScanner &sc, const FParseValue *vals) |
| 509 | { |
| 510 | // May be given flags by number... |
| 511 | if (sc.CheckNumber()) |
| 512 | { |
| 513 | sc.MustGetNumber(); |
| 514 | return sc.Number; |
| 515 | } |
| 516 | |
| 517 | // ... else should be flags by name. |
| 518 | // NOTE: Later this should be removed and a normal expression used. |
| 519 | // The current DECORATE parser can't handle this though. |
| 520 | bool gotparen = sc.CheckString("("); |
| 521 | int style = 0; |
| 522 | do |
| 523 | { |
| 524 | sc.MustGetString(); |
| 525 | style |= vals[sc.MustMatchString(&vals->Name, sizeof (*vals))].Flag; |
| 526 | } |
| 527 | while (sc.CheckString("|")); |
| 528 | if (gotparen) |
| 529 | { |
| 530 | sc.MustGetStringName(")"); |
| 531 | } |
| 532 | |
| 533 | return style; |
| 534 | } |
| 535 | |
| 536 | |
| 537 |
no test coverage detected