(rawType: string)
| 710 | /** Map raw .NET AST type name to our StatementType union */ |
| 711 | // exported for testing |
| 712 | export function mapStatementType(rawType: string): StatementType { |
| 713 | switch (rawType) { |
| 714 | case 'PipelineAst': |
| 715 | return 'PipelineAst' |
| 716 | case 'PipelineChainAst': |
| 717 | return 'PipelineChainAst' |
| 718 | case 'AssignmentStatementAst': |
| 719 | return 'AssignmentStatementAst' |
| 720 | case 'IfStatementAst': |
| 721 | return 'IfStatementAst' |
| 722 | case 'ForStatementAst': |
| 723 | return 'ForStatementAst' |
| 724 | case 'ForEachStatementAst': |
| 725 | return 'ForEachStatementAst' |
| 726 | case 'WhileStatementAst': |
| 727 | return 'WhileStatementAst' |
| 728 | case 'DoWhileStatementAst': |
| 729 | return 'DoWhileStatementAst' |
| 730 | case 'DoUntilStatementAst': |
| 731 | return 'DoUntilStatementAst' |
| 732 | case 'SwitchStatementAst': |
| 733 | return 'SwitchStatementAst' |
| 734 | case 'TryStatementAst': |
| 735 | return 'TryStatementAst' |
| 736 | case 'TrapStatementAst': |
| 737 | return 'TrapStatementAst' |
| 738 | case 'FunctionDefinitionAst': |
| 739 | return 'FunctionDefinitionAst' |
| 740 | case 'DataStatementAst': |
| 741 | return 'DataStatementAst' |
| 742 | default: |
| 743 | return 'UnknownStatementAst' |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | /** Map raw .NET AST type name to our CommandElementType union */ |
| 748 | // exported for testing |
no outgoing calls
no test coverage detected