| 6391 | } |
| 6392 | |
| 6393 | void TParseContext::nestedBlockCheck(const TSourceLoc& loc, const bool allowedInnerStruct) |
| 6394 | { |
| 6395 | if ((!allowedInnerStruct && structNestingLevel > 0) || |
| 6396 | (allowedInnerStruct && structNestingLevel <= 0) || |
| 6397 | blockNestingLevel > 0) |
| 6398 | error(loc, "cannot nest a block definition inside a structure or block", "", ""); |
| 6399 | ++blockNestingLevel; |
| 6400 | } |
| 6401 | |
| 6402 | void TParseContext::nestedStructCheck(const TSourceLoc& loc) |
| 6403 | { |