PsiElement (ASTNode node) { IElementType type = node.getElementType(); if (type == ADD_EXPRESSION) { return new ShAddExpressionImpl(node); } else if (type == ADD_OPERATION) { return new ShAddOperationImpl(node); } else if (type == ARITHMETIC_EXPANSION) { return new ShArithmeticExpansionImpl(node); } else if (type == ARRAY_ASSIGNMENT) { return new ShArrayAssignmentImpl(node); } else if (type == ARRAY_EXPRESSION) { return new ShArrayExpressionImpl(node); } else if (type == ARRAY_OPERATION) { return new ShArrayOperationImpl(node); } else if (type == ASSIGNMENT_COMMAND) { return new ShAssignmentCommandImpl(node); } else if (type == ASSIGNMENT_CONDITION) { return new ShAssignmentConditionImpl(node); } else if (type == ASSIGNMENT_EXPRESSION) { return new ShAssignmentExpressionImpl(node); } else if (type == ASSIGNMENT_LIST) { return new ShAssignmentListImpl(node); } else if (type == ASSIGNMENT_OPERATION) { return new ShAssignmentOperationImpl(node); } else if (type == BITWISE_AND_EXPRESSION) { return new ShBitwiseAndExpressionImpl(node); } else if (type == BITWISE_AND_OPERATION) { return new ShBitwiseAndOperationImpl(node); } else if (type == BITWISE_EXCLUSIVE_OR_EXPRESSION) { return new ShBitwiseExclusiveOrExpressionImpl(node); } else if (type == BITWISE_EXCLUSIVE_OR_OPERATION) { return new ShBitwiseExclusiveOrOperationImpl(node); } else if (type == BITWISE_OR_EXPRESSION) { return new ShBitwiseOrExpressionImpl(node); } else if (type == BITWISE_OR_OPERATION) { return new ShBitwiseOrOperationImpl(node); } else if (type == BITWISE_SHIFT_EXPRESSION) { return new ShBitwiseShiftExpressionImpl(node); } else if (type == BITWISE_SHIFT_OPERATION) { return new ShBitwiseShiftOperationImpl(node); } else if (type == BLOCK) { return new ShBlockImpl(node); } else if (type == BRACE_EXPANSION) { return new ShBraceExpansionImpl(node); } else if (type == CASE_CLAUSE) { return new ShCaseClauseImpl(node); } else if (type == CASE_COMMAND) { return new ShCaseCommandImpl(node); } else if (type == COMMAND) { return new ShCommandImpl(node); } else if (type == COMMANDS_LIST) { return new ShCommandsListImpl(node); } else if (type == COMMAND_SUBSTITUTION_COMMAND) { return new ShCommandSubstitutionCommandImpl(node); } else if (type == COMMA_EXPRESSION) { return new ShCommaExpressionImpl(node); } else if (type == COMMA_OPERATION) { return new ShCommaOperationImpl(node); } else if (type == COMPARISON_CONDITION) { return new ShComparisonConditionImpl(node); } else if (type == COMPARISON_EXPRESSION) { return new ShComparisonExpressionImpl(node); } else if (type == COMPARISON_OPERATION) { return new ShComparisonOperationImpl(node); } else if (type == COMPOUND_LIST) { return new ShCompoundListImpl(node); } else if (type == CONDITIONAL_COMMAND) { return new ShConditionalCommandImpl(node); } else if (type == CONDITIONAL_EXPRESSION) { return new ShConditionalExpressionImpl(node); } else if (type == CONDITIONAL_OPERATION) { return new ShConditionalOperationImpl(node); } else if (type == DO_BLOCK) { return new ShDoBlockImpl(node); } else if (type == ELIF_CLAUSE) { return new ShElifClauseImpl(node); } else if (type == ELSE_CLAUSE) { return new ShElseClauseImpl(node); } else if (type == EQUALITY_CONDITION) { return new ShEqualityConditionImpl(node); } else if (type == EQUALITY_EXPRESSION) { return new ShEqualityExpressionImpl(node); } else if (type == EQUALITY_OPERATION) { return new ShEqualityOperationImpl(node); } else if (type == EVAL_COMMAND) { return new ShEvalCommandImpl(node); } else if (type == EXP_EXPRESSION) { return new ShExpExpressionImpl(node); } else if (type == EXP_OPERATION) { return new ShExpOperationImpl(node); } else if (type == FOR_CLAUSE) { return new ShForClauseImpl(node); } else if (type == FOR_COMMAND) { return new ShForCommandImpl(node); } else if (type == FUNCTION_DEFINITION) { return new ShFunctionDefinitionImpl(node); } else if (type == GENERIC_COMMAND_DIRECTIVE) { return new ShGenericCommandDirectiveImpl(node); } else if (type == HEREDOC) { return new ShHeredocImpl(node); } else if (type == IF_COMMAND) { return new ShIfCommandImpl(node); } else if (type == INCLUDE_COMMAND) { return new ShIncludeCommandImpl(node); } else if (type == INCLUDE_DIRECTIVE) { return new ShIncludeDirectiveImpl(node); } else if (type == INDEX_EXPRESSION) { return new ShIndexExpressionImpl(node); } else if (type == INDEX_OPERATION) { return new ShIndexOperationImpl(node); } else if (type == LET_COMMAND) { return new ShLetCommandImpl(node); } else if (type == LIST_TERMINATOR) { return new ShListTerminatorImpl(node); } else if (type == LITERAL) { return new ShLiteralImpl(node); } else if (type == LITERAL_CONDITION) { return new ShLiteralConditionImpl(node); } else if (type == LITERAL_EXPRESSION) { return new ShLiteralExpressionImpl(node); } else if (type == LITERAL_OPERATION) { return new ShLiteralOperationImpl(node); } else if (type == LOGICAL_AND_CONDITION) { return new ShLogicalAndConditionImpl(node); } else if (type == LOGICAL_AND_EXPRESSION) { return new ShLogicalAndExpressionImpl(node); } else if (type == LOGICAL_AND_OPERATION) { return new ShLogicalAndOperationImpl(node); } else if (type == LOGICAL_BITWISE_CONDITION) { return new ShLogicalBitwiseConditionImpl(node); } else if (type == LOGICAL_BITWISE_NEGATION_EXPRESSION) { return new ShLogicalBitwiseNegationExpressionImpl(node); } else if (type == LOGICAL_BITWISE_NEGATION_OPERATION) { return new ShLogicalBitwiseNegationOperationImpl(node); } else if (type == LOGICAL_OR_CONDITION) { return new ShLogicalOrConditionImpl(node); } else if (type == LOGICAL_OR_EXPRESSION) { return new ShLogicalOrExpressionImpl(node); } else if (type == LOGICAL_OR_OPERATION) { return new ShLogicalOrOperationImpl(node); } else if (type == MUL_EXPRESSION) { return new ShMulExpressionImpl(node); } else if (type == MUL_OPERATION) { return new ShMulOperationImpl(node); } else if (type == NUMBER) { return new ShNumberImpl(node); } else if (type == OLD_ARITHMETIC_EXPANSION) { return new ShOldArithmeticExpansionImpl(node); } else if (type == PARENTHESES_BLOCK) { return new ShParenthesesBlockImpl(node); } else if (type == PARENTHESES_CONDITION) { return new ShParenthesesConditionImpl(node); } else if (type == PARENTHESES_EXPRESSION) { return new ShParenthesesExpressionImpl(node); } else if (type == PARENTHESES_OPERATION) { return new ShParenthesesOperationImpl(node); } else if (type == PATTERN) { return new ShPatternImpl(node); } else if (type == PIPELINE_COMMAND) { return new ShPipelineCommandImpl(node); } else if (type == POST_EXPRESSION) { return new ShPostExpressionImpl(node); } else if (type == POST_OPERATION) { return new ShPostOperationImpl(node); } else if (type == PRE_EXPRESSION) { return new ShPreExpressionImpl(node); } else if (type == PRE_OPERATION) { return new ShPreOperationImpl(node); } else if (type == PROCESS_SUBSTITUTION) { return new ShProcessSubstitutionImpl(node); } else if (type == REDIRECTION) { return new ShRedirectionImpl(node); } else if (type == REGEX_CONDITION) { return new ShRegexConditionImpl(node); } else if (type == REGEX_PATTERN) { return new ShRegexPatternImpl(node); } else if (type == SELECT_COMMAND) { return new ShSelectCommandImpl(node); } else if (type == SHELL_COMMAND) { return new ShShellCommandImpl(node); } else if (type == SHELL_PARAMETER_EXPANSION) { return new ShShellParameterExpansionImpl(node); } else if (type == SIMPLE_COMMAND) { return new ShSimpleCommandImpl(node); } else if (type == SIMPLE_COMMAND_ELEMENT) { return new ShSimpleCommandElementImpl(node); } else if (type == STRING) { return new ShStringImpl(node); } else if (type == SUBSHELL_COMMAND) { return new ShSubshellCommandImpl(node); } else if (type == TEST_COMMAND) { return new ShTestCommandImpl(node); } else if (type == THEN_CLAUSE) { return new ShThenClauseImpl(node); } else if (type == UNARY_EXPRESSION) { return new ShUnaryExpressionImpl(node); } else if (type == UNARY_OPERATION) { return new ShUnaryOperationImpl(node); } else if (type == UNTIL_COMMAND) { return new ShUntilCommandImpl(node); } else if (type == VARIABLE) { return new ShVariableImpl(node); } else if (type == WHILE_COMMAND) { return new ShWhileCommandImpl(node); } throw new AssertionError("Unknown element type: " + type); }