| 1426 | } |
| 1427 | |
| 1428 | void SymbolScanner::setParameterDirection(StructMember *param, AstNode *directionNode) |
| 1429 | { |
| 1430 | /* Extract parameter direction: in/out/inout/out byref. */ |
| 1431 | param_direction_t param_direction; |
| 1432 | if (nullptr != directionNode) |
| 1433 | { |
| 1434 | switch (directionNode->getToken().getToken()) |
| 1435 | { |
| 1436 | case TOK_IN: |
| 1437 | { |
| 1438 | param_direction = param_direction_t::kInDirection; |
| 1439 | break; |
| 1440 | } |
| 1441 | case TOK_OUT: |
| 1442 | { |
| 1443 | param_direction = param_direction_t::kOutDirection; |
| 1444 | break; |
| 1445 | } |
| 1446 | case TOK_INOUT: |
| 1447 | { |
| 1448 | param_direction = param_direction_t::kInoutDirection; |
| 1449 | break; |
| 1450 | } |
| 1451 | default: |
| 1452 | { |
| 1453 | delete param; |
| 1454 | throw semantic_error(format_string("line %d: expected parameter direction type", |
| 1455 | directionNode->getToken().getFirstLine())); |
| 1456 | } |
| 1457 | } |
| 1458 | } |
| 1459 | else /* if no direction specified, default case is an 'in' variable */ |
| 1460 | { |
| 1461 | param_direction = param_direction_t::kInDirection; |
| 1462 | } |
| 1463 | param->setDirection(param_direction); |
| 1464 | } |
| 1465 | |
| 1466 | AstNode *SymbolScanner::handleExpr(AstNode *node, bottom_up) |
| 1467 | { |
nothing calls this directly
no test coverage detected