MCPcopy Index your code
hub / github.com/codeaashu/claude-code / mapStatementType

Function mapStatementType

src/utils/powershell/parser.ts:712–745  ·  view source on GitHub ↗
(rawType: string)

Source from the content-addressed store, hash-verified

710/** Map raw .NET AST type name to our StatementType union */
711// exported for testing
712export 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

Callers 1

transformStatementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected