Search in sources :

Example 1 with N4ClassDeclaration

use of org.eclipse.n4js.n4JS.N4ClassDeclaration in project n4js by eclipse.

the class AutomaticCancelationTest method testCancelIndicatorGetsInvokedAutomatically.

@Test
public void testCancelIndicatorGetsInvokedAutomatically() throws Exception {
    String program = " class X { \n\t a: any; \n\t a: any; } } ";
    Script s;
    try {
        s = ph.parse(program);
        N4ClassDeclaration clazz = (N4ClassDeclaration) s.getScriptElements().get(0);
        Map<Object, Object> context = new HashMap<>();
        context.put(CancelableDiagnostician.CANCEL_INDICATOR, new TraceLeavingCancelIndicator());
        // the cancel indicator in use sets a flag in case its isCanceled() was queried
        assertTrue(!(wasChecked.get()));
        DiagnosticChain chain = new BasicDiagnostic();
        try {
            v.validate(clazz, chain, context);
            fail("expected OperationCanceledException or OperationCanceledError was not thrown");
        } catch (Throwable th) {
            assertTrue("wrong kind of throwable; expected: OperationCanceledException or OperationCanceledError, actual: " + th.getClass().getSimpleName(), operationCanceledManager.isOperationCanceledException(th));
        }
        assertTrue(wasChecked.get());
        // now validate with a cancel indicator that never cancels,
        // upon which validation methods run and errors are recorded.
        context.put(CancelableDiagnostician.CANCEL_INDICATOR, CancelIndicator.NullImpl);
        final boolean isValid02 = v.validate(clazz, chain, context);
        assertTrue(!isValid02);
        // validate again (this time with the default cancel indicator, which never cancels),
        // check expected errors one by one.
        String[] expectedErrorMsgs = { "The field a (line 2) duplicates field a (line 3).", "The field a (line 3) duplicates field a (line 2)." };
        for (String expectedErrorMsg : expectedErrorMsgs) {
            vth.assertError(s, N4JSPackage.Literals.N4_MEMBER_DECLARATION, IssueCodes.CLF_DUP_MEMBER, expectedErrorMsg);
        }
    } catch (Exception e) {
        e.printStackTrace();
        throw e;
    }
}
Also used : Script(org.eclipse.n4js.n4JS.Script) HashMap(java.util.HashMap) BasicDiagnostic(org.eclipse.emf.common.util.BasicDiagnostic) N4ClassDeclaration(org.eclipse.n4js.n4JS.N4ClassDeclaration) DiagnosticChain(org.eclipse.emf.common.util.DiagnosticChain) Test(org.junit.Test)

Example 2 with N4ClassDeclaration

use of org.eclipse.n4js.n4JS.N4ClassDeclaration in project n4js by eclipse.

the class N4JSSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == N4JSPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case N4JSPackage.ADDITIVE_EXPRESSION:
                sequence_AdditiveExpression(context, (AdditiveExpression) semanticObject);
                return;
            case N4JSPackage.ANNOTATION:
                sequence_AnnotationNoAtSign(context, (Annotation) semanticObject);
                return;
            case N4JSPackage.ANNOTATION_LIST:
                sequence_AnnotationList(context, (AnnotationList) semanticObject);
                return;
            case N4JSPackage.ARGUMENT:
                sequence_Argument(context, (Argument) semanticObject);
                return;
            case N4JSPackage.ARRAY_BINDING_PATTERN:
                sequence_ArrayBindingPattern(context, (ArrayBindingPattern) semanticObject);
                return;
            case N4JSPackage.ARRAY_ELEMENT:
                sequence_ArrayElement(context, (ArrayElement) semanticObject);
                return;
            case N4JSPackage.ARRAY_LITERAL:
                sequence_ArrayLiteral(context, (ArrayLiteral) semanticObject);
                return;
            case N4JSPackage.ARRAY_PADDING:
                sequence_ArrayPadding(context, (ArrayPadding) semanticObject);
                return;
            case N4JSPackage.ARROW_FUNCTION:
                sequence_ArrowExpression_ColonSepReturnTypeRef_StrictFormalParameters(context, (ArrowFunction) semanticObject);
                return;
            case N4JSPackage.ASSIGNMENT_EXPRESSION:
                sequence_AssignmentExpression(context, (AssignmentExpression) semanticObject);
                return;
            case N4JSPackage.AWAIT_EXPRESSION:
                sequence_AwaitExpression(context, (AwaitExpression) semanticObject);
                return;
            case N4JSPackage.BINARY_BITWISE_EXPRESSION:
                if (rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0()) {
                    sequence_BitwiseANDExpression(context, (BinaryBitwiseExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_BitwiseANDExpression_BitwiseORExpression_BitwiseXORExpression(context, (BinaryBitwiseExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0()) {
                    sequence_BitwiseANDExpression_BitwiseXORExpression(context, (BinaryBitwiseExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.BINARY_INT_LITERAL:
                sequence_BinaryIntLiteral(context, (BinaryIntLiteral) semanticObject);
                return;
            case N4JSPackage.BINARY_LOGICAL_EXPRESSION:
                if (rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0()) {
                    sequence_LogicalANDExpression(context, (BinaryLogicalExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_LogicalANDExpression_LogicalORExpression(context, (BinaryLogicalExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.BINDING_ELEMENT:
                if (rule == grammarAccess.getBindingElementRule()) {
                    sequence_BindingElementImpl(context, (BindingElement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBindingRestElementRule()) {
                    sequence_BindingElementImpl_BindingRestElement(context, (BindingElement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getElisionRule()) {
                    sequence_Elision(context, (BindingElement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getSingleNameBindingRule()) {
                    sequence_SingleNameBinding(context, (BindingElement) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.BINDING_PROPERTY:
                sequence_BindingProperty(context, (BindingProperty) semanticObject);
                return;
            case N4JSPackage.BLOCK:
                if (rule == grammarAccess.getBlockMinusBracesRule()) {
                    sequence_BlockMinusBraces(context, (Block) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule() || rule == grammarAccess.getBlockRule() || rule == grammarAccess.getRootStatementRule() || rule == grammarAccess.getStatementRule()) {
                    sequence_Block(context, (Block) semanticObject);
                    return;
                } else if (rule == grammarAccess.getExpressionDisguisedAsBlockRule()) {
                    sequence_ExpressionDisguisedAsBlock(context, (Block) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.BOOLEAN_LITERAL:
                sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject);
                return;
            case N4JSPackage.BREAK_STATEMENT:
                sequence_BreakStatement(context, (BreakStatement) semanticObject);
                return;
            case N4JSPackage.CASE_CLAUSE:
                sequence_CaseClause(context, (CaseClause) semanticObject);
                return;
            case N4JSPackage.CAST_EXPRESSION:
                sequence_CastExpression(context, (CastExpression) semanticObject);
                return;
            case N4JSPackage.CATCH_BLOCK:
                sequence_CatchBlock(context, (CatchBlock) semanticObject);
                return;
            case N4JSPackage.CATCH_VARIABLE:
                sequence_BogusTypeRefFragment_CatchVariable_ColonSepDeclaredTypeRef(context, (CatchVariable) semanticObject);
                return;
            case N4JSPackage.COMMA_EXPRESSION:
                sequence_Expression(context, (CommaExpression) semanticObject);
                return;
            case N4JSPackage.CONDITIONAL_EXPRESSION:
                sequence_ConditionalExpression(context, (ConditionalExpression) semanticObject);
                return;
            case N4JSPackage.CONTINUE_STATEMENT:
                sequence_ContinueStatement(context, (ContinueStatement) semanticObject);
                return;
            case N4JSPackage.DEBUGGER_STATEMENT:
                sequence_DebuggerStatement(context, (DebuggerStatement) semanticObject);
                return;
            case N4JSPackage.DEFAULT_CLAUSE:
                sequence_DefaultClause(context, (DefaultClause) semanticObject);
                return;
            case N4JSPackage.DEFAULT_IMPORT_SPECIFIER:
                sequence_DefaultImportSpecifier(context, (DefaultImportSpecifier) semanticObject);
                return;
            case N4JSPackage.DO_STATEMENT:
                sequence_DoStatement(context, (DoStatement) semanticObject);
                return;
            case N4JSPackage.DOUBLE_LITERAL:
                sequence_DoubleLiteral(context, (DoubleLiteral) semanticObject);
                return;
            case N4JSPackage.EMPTY_STATEMENT:
                sequence_EmptyStatement(context, (EmptyStatement) semanticObject);
                return;
            case N4JSPackage.EQUALITY_EXPRESSION:
                sequence_EqualityExpression(context, (EqualityExpression) semanticObject);
                return;
            case N4JSPackage.EXPORT_DECLARATION:
                if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ExportClause_ExportDeclarationImpl_ExportFromClause(context, (ExportDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ExportClause_ExportDeclaration_ExportDeclarationImpl_ExportFromClause(context, (ExportDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getExportDeclarationRule()) {
                    sequence_ExportClause_ExportDeclaration_ExportDeclarationImpl_ExportFromClause(context, (ExportDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.EXPORT_SPECIFIER:
                sequence_ExportSpecifier(context, (ExportSpecifier) semanticObject);
                return;
            case N4JSPackage.EXPORTED_VARIABLE_BINDING:
                sequence_ExportedVariableBinding(context, (ExportedVariableBinding) semanticObject);
                return;
            case N4JSPackage.EXPORTED_VARIABLE_DECLARATION:
                sequence_ColonSepDeclaredTypeRef_ExportedVariableDeclaration_VariableDeclarationImpl(context, (ExportedVariableDeclaration) semanticObject);
                return;
            case N4JSPackage.EXPORTED_VARIABLE_STATEMENT:
                if (rule == grammarAccess.getAnnotatedExportableElementRule()) {
                    sequence_AnnotatedExportableElement(context, (ExportedVariableStatement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getExportableElementRule()) {
                    sequence_AnnotatedExportableElement_ExportedVariableStatement(context, (ExportedVariableStatement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getExportedVariableStatementRule()) {
                    sequence_ExportedVariableStatement(context, (ExportedVariableStatement) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.EXPRESSION_ANNOTATION_LIST:
                sequence_ExpressionAnnotationList(context, (ExpressionAnnotationList) semanticObject);
                return;
            case N4JSPackage.EXPRESSION_STATEMENT:
                if (rule == grammarAccess.getAssignmentExpressionStatementRule()) {
                    sequence_AssignmentExpressionStatement(context, (ExpressionStatement) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule() || rule == grammarAccess.getRootStatementRule() || rule == grammarAccess.getStatementRule() || rule == grammarAccess.getExpressionStatementRule()) {
                    sequence_ExpressionStatement(context, (ExpressionStatement) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.FINALLY_BLOCK:
                sequence_FinallyBlock(context, (FinallyBlock) semanticObject);
                return;
            case N4JSPackage.FOR_STATEMENT:
                sequence_ForStatement(context, (ForStatement) semanticObject);
                return;
            case N4JSPackage.FORMAL_PARAMETER:
                if (rule == grammarAccess.getFormalParameterRule()) {
                    sequence_BindingElementFragment_BogusTypeRefFragment_ColonSepDeclaredTypeRef_FormalParameter(context, (FormalParameter) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBindingIdentifierAsFormalParameterRule()) {
                    sequence_BindingIdentifierAsFormalParameter(context, (FormalParameter) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.FUNCTION_DECLARATION:
                if (rule == grammarAccess.getExportableElementRule()) {
                    sequence_AnnotatedExportableElement_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionDeclaration_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedExportableElementRule()) {
                    sequence_AnnotatedExportableElement_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getStatementRule()) {
                    sequence_AnnotatedFunctionDeclaration_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionDeclaration_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedFunctionDeclarationRule()) {
                    sequence_AnnotatedFunctionDeclaration_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionDeclaration_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getFunctionDeclarationRule() || rule == grammarAccess.getRootStatementRule()) {
                    sequence_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionDeclaration_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.FUNCTION_EXPRESSION:
                if (rule == grammarAccess.getPrimaryExpressionRule() || rule == grammarAccess.getLeftHandSideExpressionRule() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule() || action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_AnnotatedExpression_AsyncFunctionExpression_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionExpression_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedExpressionRule()) {
                    sequence_AnnotatedExpression_AsyncNoTrailingLineBreak_ColonSepReturnTypeRef_FunctionBody_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAsyncFunctionExpressionRule()) {
                    sequence_AsyncFunctionExpression_ColonSepReturnTypeRef_FunctionBody_FunctionHeader_StrictFormalParameters_TypeVariables(context, (FunctionExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getFunctionExpressionRule()) {
                    sequence_ColonSepReturnTypeRef_FunctionBody_FunctionExpression_FunctionHeader_FunctionImpl_StrictFormalParameters_TypeVariables(context, (FunctionExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.HEX_INT_LITERAL:
                sequence_HexIntLiteral(context, (HexIntLiteral) semanticObject);
                return;
            case N4JSPackage.IDENTIFIER_REF:
                if (rule == grammarAccess.getPrimaryExpressionRule() || rule == grammarAccess.getIdentifierRefRule() || rule == grammarAccess.getLeftHandSideExpressionRule() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule() || action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0() || rule == grammarAccess.getJSXElementNameExpressionRule() || action == grammarAccess.getJSXElementNameExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_0()) {
                    sequence_IdentifierRef(context, (IdentifierRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLetIdentifierRefRule()) {
                    sequence_LetIdentifierRef(context, (IdentifierRef) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.IF_STATEMENT:
                sequence_IfStatement(context, (IfStatement) semanticObject);
                return;
            case N4JSPackage.IMPORT_DECLARATION:
                if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ImportClause_ImportDeclarationImpl_ImportSpecifiersExceptDefault(context, (ImportDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ImportClause_ImportDeclaration_ImportDeclarationImpl_ImportSpecifiersExceptDefault(context, (ImportDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getImportDeclarationRule()) {
                    sequence_ImportClause_ImportDeclaration_ImportDeclarationImpl_ImportSpecifiersExceptDefault(context, (ImportDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.INDEXED_ACCESS_EXPRESSION:
                if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_2_0_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getIndexedAccessExpressionTargetAction_1_2_1_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_2_2_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getTaggedTemplateStringTargetAction_1_2_3_0_0()) {
                    sequence_IndexedAccessExpressionTail_LeftHandSideExpression_IndexedAccessExpression_1_2_1_0_ParameterizedCallExpression_1_2_0_0_ParameterizedPropertyAccessExpression_1_2_2_0_TaggedTemplateString_1_2_3_0_0(context, (IndexedAccessExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLeftHandSideExpressionRule() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_IndexedAccessExpressionTail_LeftHandSideExpression_MemberExpression(context, (IndexedAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule()) {
                    sequence_IndexedAccessExpressionTail_MemberExpression(context, (IndexedAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_1_3_3_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_3_3_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_1_3_3_2_0()) {
                    sequence_IndexedAccessExpressionTail_MemberExpression_IndexedAccessExpression_1_3_3_0_0_ParameterizedPropertyAccessExpression_1_3_3_1_0_TaggedTemplateString_1_3_3_2_0(context, (IndexedAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0()) {
                    sequence_IndexedAccessExpressionTail_MemberExpression_IndexedAccessExpression_2_1_0_0_ParameterizedPropertyAccessExpression_2_1_1_0_TaggedTemplateString_2_1_2_0(context, (IndexedAccessExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.INT_LITERAL:
                sequence_IntLiteral(context, (IntLiteral) semanticObject);
                return;
            case N4JSPackage.JSX_ELEMENT:
                sequence_JSXAttributes_JSXClosingElement_JSXElement(context, (JSXElement) semanticObject);
                return;
            case N4JSPackage.JSX_ELEMENT_NAME:
                sequence_JSXElementName(context, (JSXElementName) semanticObject);
                return;
            case N4JSPackage.JSX_EXPRESSION:
                sequence_JSXExpression(context, (JSXExpression) semanticObject);
                return;
            case N4JSPackage.JSX_PROPERTY_ATTRIBUTE:
                sequence_JSXPropertyAttribute(context, (JSXPropertyAttribute) semanticObject);
                return;
            case N4JSPackage.JSX_SPREAD_ATTRIBUTE:
                sequence_JSXSpreadAttribute(context, (JSXSpreadAttribute) semanticObject);
                return;
            case N4JSPackage.LABELLED_STATEMENT:
                sequence_LabelledStatement(context, (LabelledStatement) semanticObject);
                return;
            case N4JSPackage.LEGACY_OCTAL_INT_LITERAL:
                sequence_LegacyOctalIntLiteral(context, (LegacyOctalIntLiteral) semanticObject);
                return;
            case N4JSPackage.LITERAL_ANNOTATION_ARGUMENT:
                sequence_LiteralAnnotationArgument(context, (LiteralAnnotationArgument) semanticObject);
                return;
            case N4JSPackage.LITERAL_OR_COMPUTED_PROPERTY_NAME:
                sequence_LiteralOrComputedPropertyName(context, (LiteralOrComputedPropertyName) semanticObject);
                return;
            case N4JSPackage.MULTIPLICATIVE_EXPRESSION:
                sequence_MultiplicativeExpression(context, (MultiplicativeExpression) semanticObject);
                return;
            case N4JSPackage.N4_CLASS_DECLARATION:
                if (rule == grammarAccess.getExportableElementRule()) {
                    sequence_AnnotatedExportableElement_ClassExtendsClause_ClassImplementsList_Members_N4ClassDeclaration_TypeVariables_VersionDeclaration(context, (N4ClassDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedExportableElementRule()) {
                    sequence_AnnotatedExportableElement_ClassExtendsClause_ClassImplementsList_Members_TypeVariables(context, (N4ClassDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ClassExtendsClause_ClassImplementsList_Members_N4ClassDeclaration_TypeVariables_VersionDeclaration(context, (N4ClassDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_ClassExtendsClause_ClassImplementsList_Members_TypeVariables_VersionDeclaration(context, (N4ClassDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4ClassDeclarationRule()) {
                    sequence_ClassExtendsClause_ClassImplementsList_Members_N4ClassDeclaration_TypeVariables_VersionDeclaration(context, (N4ClassDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_CLASS_EXPRESSION:
                if (rule == grammarAccess.getAnnotatedExpressionRule()) {
                    sequence_AnnotatedExpression_ClassExtendsClause_ClassImplementsList_Members(context, (N4ClassExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPrimaryExpressionRule() || rule == grammarAccess.getLeftHandSideExpressionRule() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule() || action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_AnnotatedExpression_ClassExtendsClause_ClassImplementsList_Members_N4ClassExpression(context, (N4ClassExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4ClassExpressionRule()) {
                    sequence_ClassExtendsClause_ClassImplementsList_Members_N4ClassExpression(context, (N4ClassExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_ENUM_DECLARATION:
                if (rule == grammarAccess.getAnnotatedExportableElementRule()) {
                    sequence_AnnotatedExportableElement(context, (N4EnumDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getExportableElementRule()) {
                    sequence_AnnotatedExportableElement_N4EnumDeclaration_VersionDeclaration(context, (N4EnumDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_N4EnumDeclaration_VersionDeclaration(context, (N4EnumDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_VersionDeclaration(context, (N4EnumDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4EnumDeclarationRule()) {
                    sequence_N4EnumDeclaration_VersionDeclaration(context, (N4EnumDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_ENUM_LITERAL:
                sequence_N4EnumLiteral(context, (N4EnumLiteral) semanticObject);
                return;
            case N4JSPackage.N4_FIELD_DECLARATION:
                if (rule == grammarAccess.getAnnotatedN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_BogusTypeRefFragment_ColonSepDeclaredTypeRef_FieldDeclarationImpl(context, (N4FieldDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_BogusTypeRefFragment_ColonSepDeclaredTypeRef_FieldDeclarationImpl_N4FieldDeclaration(context, (N4FieldDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4FieldDeclarationRule()) {
                    sequence_BogusTypeRefFragment_ColonSepDeclaredTypeRef_FieldDeclarationImpl_N4FieldDeclaration(context, (N4FieldDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_GETTER_DECLARATION:
                if (rule == grammarAccess.getAnnotatedN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader(context, (N4GetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader_N4GetterDeclaration(context, (N4GetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4GetterDeclarationRule()) {
                    sequence_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader_N4GetterDeclaration(context, (N4GetterDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_INTERFACE_DECLARATION:
                if (rule == grammarAccess.getExportableElementRule()) {
                    sequence_AnnotatedExportableElement_InterfaceExtendsList_Members_N4InterfaceDeclaration_TypeVariables_VersionDeclaration(context, (N4InterfaceDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedExportableElementRule()) {
                    sequence_AnnotatedExportableElement_InterfaceExtendsList_Members_TypeVariables(context, (N4InterfaceDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getScriptElementRule()) {
                    sequence_AnnotatedScriptElement_InterfaceExtendsList_Members_N4InterfaceDeclaration_TypeVariables_VersionDeclaration(context, (N4InterfaceDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedScriptElementRule()) {
                    sequence_AnnotatedScriptElement_InterfaceExtendsList_Members_TypeVariables_VersionDeclaration(context, (N4InterfaceDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4InterfaceDeclarationRule()) {
                    sequence_InterfaceExtendsList_Members_N4InterfaceDeclaration_TypeVariables_VersionDeclaration(context, (N4InterfaceDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_MEMBER_ANNOTATION_LIST:
                sequence_N4MemberAnnotationList(context, (N4MemberAnnotationList) semanticObject);
                return;
            case N4JSPackage.N4_METHOD_DECLARATION:
                if (rule == grammarAccess.getN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_AsyncNoTrailingLineBreak_BogusTypeRefFragment_ColonSepReturnTypeRef_MethodParamsReturnAndBody_N4MethodDeclaration_StrictFormalParameters_TypeVariables(context, (N4MethodDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_AsyncNoTrailingLineBreak_BogusTypeRefFragment_ColonSepReturnTypeRef_MethodParamsReturnAndBody_StrictFormalParameters_TypeVariables(context, (N4MethodDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4MethodDeclarationRule()) {
                    sequence_AsyncNoTrailingLineBreak_BogusTypeRefFragment_ColonSepReturnTypeRef_MethodParamsReturnAndBody_N4MethodDeclaration_StrictFormalParameters_TypeVariables(context, (N4MethodDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4CallableConstructorDeclarationRule()) {
                    sequence_ColonSepReturnTypeRef_MethodParamsReturnAndBody_StrictFormalParameters(context, (N4MethodDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.N4_SETTER_DECLARATION:
                if (rule == grammarAccess.getAnnotatedN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration(context, (N4SetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4MemberDeclarationRule()) {
                    sequence_AnnotatedN4MemberDeclaration_N4SetterDeclaration(context, (N4SetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getN4SetterDeclarationRule()) {
                    sequence_N4SetterDeclaration(context, (N4SetterDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.NAMED_IMPORT_SPECIFIER:
                sequence_NamedImportSpecifier(context, (NamedImportSpecifier) semanticObject);
                return;
            case N4JSPackage.NAMESPACE_IMPORT_SPECIFIER:
                sequence_NamespaceImportSpecifier(context, (NamespaceImportSpecifier) semanticObject);
                return;
            case N4JSPackage.NEW_EXPRESSION:
                if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_1_3_3_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_3_3_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_1_3_3_2_0()) {
                    sequence_Arguments_ConcreteTypeArguments_MemberExpression_IndexedAccessExpression_1_3_3_0_0_ParameterizedPropertyAccessExpression_1_3_3_1_0_TaggedTemplateString_1_3_3_2_0(context, (NewExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLeftHandSideExpressionRule() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_Arguments_ConcreteTypeArguments_MemberExpression(context, (NewExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.NEW_TARGET:
                sequence_MemberExpression(context, (NewTarget) semanticObject);
                return;
            case N4JSPackage.NULL_LITERAL:
                sequence_NullLiteral(context, (NullLiteral) semanticObject);
                return;
            case N4JSPackage.OBJECT_BINDING_PATTERN:
                sequence_ObjectBindingPattern(context, (ObjectBindingPattern) semanticObject);
                return;
            case N4JSPackage.OBJECT_LITERAL:
                sequence_ObjectLiteral(context, (ObjectLiteral) semanticObject);
                return;
            case N4JSPackage.OCTAL_INT_LITERAL:
                sequence_OctalIntLiteral(context, (OctalIntLiteral) semanticObject);
                return;
            case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION:
                if (rule == grammarAccess.getLeftHandSideExpressionRule() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_Arguments_ConcreteTypeArguments_LeftHandSideExpression_ParameterizedCallExpression(context, (ParameterizedCallExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPrimaryExpressionRule() || rule == grammarAccess.getParameterizedCallExpressionRule() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule() || action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0()) {
                    sequence_Arguments_ConcreteTypeArguments_ParameterizedCallExpression(context, (ParameterizedCallExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_2_0_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getIndexedAccessExpressionTargetAction_1_2_1_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_2_2_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getTaggedTemplateStringTargetAction_1_2_3_0_0()) {
                    sequence_Arguments_LeftHandSideExpression_IndexedAccessExpression_1_2_1_0_ParameterizedCallExpression_1_2_0_0_ParameterizedPropertyAccessExpression_1_2_2_0_TaggedTemplateString_1_2_3_0_0(context, (ParameterizedCallExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PARAMETERIZED_PROPERTY_ACCESS_EXPRESSION:
                if (rule == grammarAccess.getJSXElementNameExpressionRule() || action == grammarAccess.getJSXElementNameExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_0()) {
                    sequence_ConcreteTypeArguments_JSXElementNameExpression_ParameterizedPropertyAccessExpressionTail(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLeftHandSideExpressionRule() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_ConcreteTypeArguments_LeftHandSideExpression_MemberExpression_ParameterizedPropertyAccessExpressionTail(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_2_0_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getIndexedAccessExpressionTargetAction_1_2_1_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_2_2_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getTaggedTemplateStringTargetAction_1_2_3_0_0()) {
                    sequence_ConcreteTypeArguments_LeftHandSideExpression_ParameterizedPropertyAccessExpressionTail_IndexedAccessExpression_1_2_1_0_ParameterizedCallExpression_1_2_0_0_ParameterizedPropertyAccessExpression_1_2_2_0_TaggedTemplateString_1_2_3_0_0(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_1_3_3_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_3_3_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_1_3_3_2_0()) {
                    sequence_ConcreteTypeArguments_MemberExpression_ParameterizedPropertyAccessExpressionTail_IndexedAccessExpression_1_3_3_0_0_ParameterizedPropertyAccessExpression_1_3_3_1_0_TaggedTemplateString_1_3_3_2_0(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0()) {
                    sequence_ConcreteTypeArguments_MemberExpression_ParameterizedPropertyAccessExpressionTail_IndexedAccessExpression_2_1_0_0_ParameterizedPropertyAccessExpression_2_1_1_0_TaggedTemplateString_2_1_2_0(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule()) {
                    sequence_ConcreteTypeArguments_MemberExpression_ParameterizedPropertyAccessExpressionTail(context, (ParameterizedPropertyAccessExpression) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PAREN_EXPRESSION:
                sequence_ParenExpression(context, (ParenExpression) semanticObject);
                return;
            case N4JSPackage.POSTFIX_EXPRESSION:
                sequence_PostfixExpression(context, (PostfixExpression) semanticObject);
                return;
            case N4JSPackage.PROMISIFY_EXPRESSION:
                sequence_PromisifyExpression(context, (PromisifyExpression) semanticObject);
                return;
            case N4JSPackage.PROPERTY_ASSIGNMENT_ANNOTATION_LIST:
                sequence_PropertyAssignmentAnnotationList(context, (PropertyAssignmentAnnotationList) semanticObject);
                return;
            case N4JSPackage.PROPERTY_GETTER_DECLARATION:
                if (rule == grammarAccess.getAnnotatedPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader(context, (PropertyGetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader_PropertyGetterDeclaration(context, (PropertyGetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyGetterDeclarationRule()) {
                    sequence_BogusTypeRefFragment_ColonSepDeclaredTypeRef_GetterHeader_PropertyGetterDeclaration(context, (PropertyGetterDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PROPERTY_METHOD_DECLARATION:
                if (rule == grammarAccess.getPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_MethodParamsAndBody_PropertyMethodDeclaration_StrictFormalParameters_TypeVariables(context, (PropertyMethodDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAnnotatedPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_MethodParamsAndBody_StrictFormalParameters_TypeVariables(context, (PropertyMethodDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyMethodDeclarationRule()) {
                    sequence_MethodParamsAndBody_PropertyMethodDeclaration_StrictFormalParameters_TypeVariables(context, (PropertyMethodDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PROPERTY_NAME_VALUE_PAIR:
                if (rule == grammarAccess.getAnnotatedPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment(context, (PropertyNameValuePair) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_PropertyNameValuePair(context, (PropertyNameValuePair) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyNameValuePairRule()) {
                    sequence_PropertyNameValuePair(context, (PropertyNameValuePair) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PROPERTY_NAME_VALUE_PAIR_SINGLE_NAME:
                if (rule == grammarAccess.getAnnotatedPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment(context, (PropertyNameValuePairSingleName) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_PropertyNameValuePairSingleName(context, (PropertyNameValuePairSingleName) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyNameValuePairSingleNameRule()) {
                    sequence_PropertyNameValuePairSingleName(context, (PropertyNameValuePairSingleName) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.PROPERTY_SETTER_DECLARATION:
                if (rule == grammarAccess.getAnnotatedPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment(context, (PropertySetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyAssignmentRule()) {
                    sequence_AnnotatedPropertyAssignment_PropertySetterDeclaration(context, (PropertySetterDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertySetterDeclarationRule()) {
                    sequence_PropertySetterDeclaration(context, (PropertySetterDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.REGULAR_EXPRESSION_LITERAL:
                sequence_RegularExpressionLiteral(context, (RegularExpressionLiteral) semanticObject);
                return;
            case N4JSPackage.RELATIONAL_EXPRESSION:
                sequence_RelationalExpression(context, (RelationalExpression) semanticObject);
                return;
            case N4JSPackage.RETURN_STATEMENT:
                sequence_ReturnStatement(context, (ReturnStatement) semanticObject);
                return;
            case N4JSPackage.SCIENTIFIC_INT_LITERAL:
                sequence_ScientificIntLiteral(context, (ScientificIntLiteral) semanticObject);
                return;
            case N4JSPackage.SCRIPT:
                sequence_Script(context, (Script) semanticObject);
                return;
            case N4JSPackage.SHIFT_EXPRESSION:
                sequence_ShiftExpression(context, (ShiftExpression) semanticObject);
                return;
            case N4JSPackage.STRING_LITERAL:
                sequence_StringLiteral(context, (StringLiteral) semanticObject);
                return;
            case N4JSPackage.SUPER_LITERAL:
                sequence_SuperLiteral(context, (SuperLiteral) semanticObject);
                return;
            case N4JSPackage.SWITCH_STATEMENT:
                sequence_SwitchStatement(context, (SwitchStatement) semanticObject);
                return;
            case N4JSPackage.TAGGED_TEMPLATE_STRING:
                if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_2_0_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getIndexedAccessExpressionTargetAction_1_2_1_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_2_2_0() || action == grammarAccess.getLeftHandSideExpressionAccess().getTaggedTemplateStringTargetAction_1_2_3_0_0()) {
                    sequence_LeftHandSideExpression_IndexedAccessExpression_1_2_1_0_ParameterizedCallExpression_1_2_0_0_ParameterizedPropertyAccessExpression_1_2_2_0_TaggedTemplateString_1_2_3_0_0(context, (TaggedTemplateString) semanticObject);
                    return;
                } else if (rule == grammarAccess.getLeftHandSideExpressionRule() || rule == grammarAccess.getPostfixExpressionRule() || action == grammarAccess.getPostfixExpressionAccess().getPostfixExpressionExpressionAction_1_0_0() || rule == grammarAccess.getCastExpressionRule() || action == grammarAccess.getCastExpressionAccess().getCastExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getUnaryExpressionRule() || rule == grammarAccess.getMultiplicativeExpressionRule() || action == grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getAdditiveExpressionRule() || action == grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getShiftExpressionRule() || action == grammarAccess.getShiftExpressionAccess().getShiftExpressionLhsAction_1_0_0() || rule == grammarAccess.getRelationalExpressionRule() || action == grammarAccess.getRelationalExpressionAccess().getRelationalExpressionLhsAction_1_0_0() || rule == grammarAccess.getEqualityExpressionRule() || action == grammarAccess.getEqualityExpressionAccess().getEqualityExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseANDExpressionRule() || action == grammarAccess.getBitwiseANDExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseXORExpressionRule() || action == grammarAccess.getBitwiseXORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getBitwiseORExpressionRule() || action == grammarAccess.getBitwiseORExpressionAccess().getBinaryBitwiseExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalANDExpressionRule() || action == grammarAccess.getLogicalANDExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getLogicalORExpressionRule() || action == grammarAccess.getLogicalORExpressionAccess().getBinaryLogicalExpressionLhsAction_1_0_0_0() || rule == grammarAccess.getConditionalExpressionRule() || action == grammarAccess.getConditionalExpressionAccess().getConditionalExpressionExpressionAction_1_0_0_0() || rule == grammarAccess.getAssignmentExpressionRule() || action == grammarAccess.getAssignmentExpressionAccess().getAssignmentExpressionLhsAction_4_1_0_0_0() || rule == grammarAccess.getExpressionRule() || action == grammarAccess.getExpressionAccess().getCommaExpressionExprsAction_1_0()) {
                    sequence_LeftHandSideExpression_MemberExpression(context, (TaggedTemplateString) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_1_3_3_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_1_3_3_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_1_3_3_2_0()) {
                    sequence_MemberExpression_IndexedAccessExpression_1_3_3_0_0_ParameterizedPropertyAccessExpression_1_3_3_1_0_TaggedTemplateString_1_3_3_2_0(context, (TaggedTemplateString) semanticObject);
                    return;
                } else if (action == grammarAccess.getMemberExpressionAccess().getIndexedAccessExpressionTargetAction_2_1_0_0() || action == grammarAccess.getMemberExpressionAccess().getParameterizedPropertyAccessExpressionTargetAction_2_1_1_0() || action == grammarAccess.getMemberExpressionAccess().getTaggedTemplateStringTargetAction_2_1_2_0()) {
                    sequence_MemberExpression_IndexedAccessExpression_2_1_0_0_ParameterizedPropertyAccessExpression_2_1_1_0_TaggedTemplateString_2_1_2_0(context, (TaggedTemplateString) semanticObject);
                    return;
                } else if (action == grammarAccess.getLeftHandSideExpressionAccess().getParameterizedCallExpressionTargetAction_1_0() || rule == grammarAccess.getMemberExpressionRule()) {
                    sequence_MemberExpression(context, (TaggedTemplateString) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.TEMPLATE_LITERAL:
                sequence_TemplateLiteral(context, (TemplateLiteral) semanticObject);
                return;
            case N4JSPackage.TEMPLATE_SEGMENT:
                if (rule == grammarAccess.getNoSubstitutionTemplateRule()) {
                    sequence_NoSubstitutionTemplate(context, (TemplateSegment) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTemplateHeadRule()) {
                    sequence_TemplateHead(context, (TemplateSegment) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTemplateMiddleRule()) {
                    sequence_TemplateMiddle(context, (TemplateSegment) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTemplateTailRule()) {
                    sequence_TemplateTail(context, (TemplateSegment) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.THIS_LITERAL:
                sequence_ThisLiteral(context, (ThisLiteral) semanticObject);
                return;
            case N4JSPackage.THROW_STATEMENT:
                sequence_ThrowStatement(context, (ThrowStatement) semanticObject);
                return;
            case N4JSPackage.TRY_STATEMENT:
                sequence_TryStatement(context, (TryStatement) semanticObject);
                return;
            case N4JSPackage.TYPE_REF_ANNOTATION_ARGUMENT:
                sequence_TypeRefAnnotationArgument(context, (TypeRefAnnotationArgument) semanticObject);
                return;
            case N4JSPackage.UNARY_EXPRESSION:
                sequence_UnaryExpression(context, (UnaryExpression) semanticObject);
                return;
            case N4JSPackage.VARIABLE_BINDING:
                if (rule == grammarAccess.getVariableDeclarationOrBindingRule() && (ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(0), grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(1)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(0)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(1)).equals(parameters) || parameters.isEmpty()) || rule == grammarAccess.getVariableBindingRule() && (ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(0), grammarAccess.getVariableBindingRule().getParameters().get(1)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(0)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(1)).equals(parameters) || parameters.isEmpty())) {
                    sequence_VariableBinding$OptionalInit$false$(context, (VariableBinding) semanticObject);
                    return;
                } else if (rule == grammarAccess.getVariableDeclarationOrBindingRule() && (ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(0), grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(1), grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(0), grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(1), grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationOrBindingRule().getParameters().get(2)).equals(parameters)) || rule == grammarAccess.getVariableBindingRule() && (ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(0), grammarAccess.getVariableBindingRule().getParameters().get(1), grammarAccess.getVariableBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(0), grammarAccess.getVariableBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(1), grammarAccess.getVariableBindingRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableBindingRule().getParameters().get(2)).equals(parameters))) {
                    sequence_VariableBinding(context, (VariableBinding) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.VARIABLE_DECLARATION:
                if (rule == grammarAccess.getBindingIdentifierAsVariableDeclarationRule()) {
                    sequence_BindingIdentifierAsVariableDeclaration(context, (VariableDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getVariableDeclarationOrBindingRule() || rule == grammarAccess.getVariableDeclarationRule() && (ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(0), grammarAccess.getVariableDeclarationRule().getParameters().get(1), grammarAccess.getVariableDeclarationRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(0), grammarAccess.getVariableDeclarationRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(1), grammarAccess.getVariableDeclarationRule().getParameters().get(2)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(2)).equals(parameters))) {
                    sequence_ColonSepDeclaredTypeRef_VariableDeclaration_VariableDeclarationImpl(context, (VariableDeclaration) semanticObject);
                    return;
                } else if (rule == grammarAccess.getVariableDeclarationRule() && (ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(0), grammarAccess.getVariableDeclarationRule().getParameters().get(1)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(0)).equals(parameters) || ImmutableSet.of(grammarAccess.getVariableDeclarationRule().getParameters().get(1)).equals(parameters) || parameters.isEmpty())) {
                    sequence_VariableDeclaration$AllowType$false$_VariableDeclarationImpl(context, (VariableDeclaration) semanticObject);
                    return;
                } else
                    break;
            case N4JSPackage.VARIABLE_STATEMENT:
                sequence_VariableStatement(context, (VariableStatement) semanticObject);
                return;
            case N4JSPackage.VERSIONED_IDENTIFIER_REF:
                sequence_IdentifierRef_VersionRequest(context, (VersionedIdentifierRef) semanticObject);
                return;
            case N4JSPackage.WHILE_STATEMENT:
                sequence_WhileStatement(context, (WhileStatement) semanticObject);
                return;
            case N4JSPackage.WITH_STATEMENT:
                sequence_WithStatement(context, (WithStatement) semanticObject);
                return;
            case N4JSPackage.YIELD_EXPRESSION:
                sequence_YieldExpression(context, (YieldExpression) semanticObject);
                return;
        }
    else if (epackage == TypeRefsPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case TypeRefsPackage.FUNCTION_TYPE_EXPRESSION:
                if (rule == grammarAccess.getTypeRefForCastRule()) {
                    sequence_ArrowFunctionTypeExpression_ColonSepReturnTypeRef_FunctionTypeExpressionOLD_TAnonymousFormalParameterList(context, (FunctionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_ArrowFunctionTypeExpression_ColonSepReturnTypeRef_FunctionTypeExpressionOLD_TAnonymousFormalParameterList_TypeRefWithModifiers(context, (FunctionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getArrowFunctionTypeExpressionRule()) {
                    sequence_ArrowFunctionTypeExpression_TAnonymousFormalParameterList(context, (FunctionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule() || rule == grammarAccess.getFunctionTypeExpressionOLDRule()) {
                    sequence_ColonSepReturnTypeRef_FunctionTypeExpressionOLD_TAnonymousFormalParameterList(context, (FunctionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithModifiersRule()) {
                    sequence_ColonSepReturnTypeRef_FunctionTypeExpressionOLD_TAnonymousFormalParameterList_TypeRefWithModifiers(context, (FunctionTypeExpression) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.INTERSECTION_TYPE_EXPRESSION:
                if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefWithoutModifiersRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getIntersectionTypeExpressionOLDRule()) {
                    sequence_IntersectionTypeExpressionOLD(context, (IntersectionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithModifiersRule()) {
                    sequence_IntersectionTypeExpressionOLD_TypeRefWithModifiers(context, (IntersectionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_IntersectionTypeExpression_IntersectionTypeExpressionOLD_TypeRefWithModifiers(context, (IntersectionTypeExpression) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.PARAMETERIZED_TYPE_REF:
                if (rule == grammarAccess.getArrayTypeRefRule()) {
                    sequence_ArrayTypeRef(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule()) {
                    sequence_ArrayTypeRef_TypeAndTypeArguments_TypeArguments(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_ArrayTypeRef_TypeAndTypeArguments_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeArgInTypeTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefNominalRule() || rule == grammarAccess.getTypeAndTypeArgumentsRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithModifiersRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments_TypeRefWithoutModifiers(context, (ParameterizedTypeRef) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.PARAMETERIZED_TYPE_REF_STRUCTURAL:
                if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getParameterizedTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefStructuralRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments(context, (ParameterizedTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers(context, (ParameterizedTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithoutModifiers(context, (ParameterizedTypeRefStructural) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.THIS_TYPE_REF_NOMINAL:
                if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeArgInTypeTypeRefRule() || rule == grammarAccess.getThisTypeRefRule() || rule == grammarAccess.getThisTypeRefNominalRule()) {
                    sequence_ThisTypeRefNominal(context, (ThisTypeRefNominal) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_ThisTypeRefNominal_TypeRefWithModifiers_TypeRefWithoutModifiers(context, (ThisTypeRefNominal) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_ThisTypeRefNominal_TypeRefWithoutModifiers(context, (ThisTypeRefNominal) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.THIS_TYPE_REF_STRUCTURAL:
                if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getThisTypeRefRule() || rule == grammarAccess.getThisTypeRefStructuralRule()) {
                    sequence_TStructMemberList_ThisTypeRefStructural(context, (ThisTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_TStructMemberList_ThisTypeRefStructural_TypeRefWithModifiers_TypeRefWithoutModifiers(context, (ThisTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_TStructMemberList_ThisTypeRefStructural_TypeRefWithoutModifiers(context, (ThisTypeRefStructural) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.TYPE_TYPE_REF:
                if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_TypeRefWithModifiers_TypeTypeRef(context, (TypeTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefWithoutModifiersRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getTypeTypeRefRule()) {
                    sequence_TypeTypeRef(context, (TypeTypeRef) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.UNION_TYPE_EXPRESSION:
                if (rule == grammarAccess.getTypeRefWithModifiersRule()) {
                    sequence_TypeRefWithModifiers_UnionTypeExpressionOLD(context, (UnionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_TypeRef_TypeRefWithModifiers_UnionTypeExpressionOLD(context, (UnionTypeExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefWithoutModifiersRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getUnionTypeExpressionOLDRule()) {
                    sequence_UnionTypeExpressionOLD(context, (UnionTypeExpression) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.VERSIONED_PARAMETERIZED_TYPE_REF:
                if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers_VersionRequest(context, (VersionedParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments_TypeRefWithoutModifiers_VersionRequest(context, (VersionedParameterizedTypeRef) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getTypeArgInTypeTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefNominalRule() || rule == grammarAccess.getTypeAndTypeArgumentsRule()) {
                    sequence_TypeAndTypeArguments_TypeArguments_VersionRequest(context, (VersionedParameterizedTypeRef) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.VERSIONED_PARAMETERIZED_TYPE_REF_STRUCTURAL:
                if (rule == grammarAccess.getTypeRefRule() || action == grammarAccess.getTypeRefAccess().getUnionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getIntersectionTypeExpressionRule() || action == grammarAccess.getIntersectionTypeExpressionAccess().getIntersectionTypeExpressionTypeRefsAction_1_0() || rule == grammarAccess.getPrimaryTypeExpressionRule() || rule == grammarAccess.getTypeRefWithModifiersRule() || rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers_VersionRequest(context, (VersionedParameterizedTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefWithoutModifiersRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithoutModifiers_VersionRequest(context, (VersionedParameterizedTypeRefStructural) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeRefForCastRule() || rule == grammarAccess.getTypeRefFunctionTypeExpressionRule() || rule == grammarAccess.getParameterizedTypeRefRule() || rule == grammarAccess.getParameterizedTypeRefStructuralRule()) {
                    sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_VersionRequest(context, (VersionedParameterizedTypeRefStructural) semanticObject);
                    return;
                } else
                    break;
            case TypeRefsPackage.WILDCARD:
                if (rule == grammarAccess.getWildcardNewNotationRule()) {
                    sequence_WildcardNewNotation(context, (Wildcard) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeArgInTypeTypeRefRule() || rule == grammarAccess.getWildcardRule()) {
                    sequence_Wildcard(context, (Wildcard) semanticObject);
                    return;
                } else if (rule == grammarAccess.getTypeArgumentRule()) {
                    sequence_Wildcard_WildcardNewNotation(context, (Wildcard) semanticObject);
                    return;
                } else
                    break;
        }
    else if (epackage == TypesPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case TypesPackage.TANONYMOUS_FORMAL_PARAMETER:
                sequence_ColonSepTypeRef_DefaultFormalParameter_TAnonymousFormalParameter(context, (TAnonymousFormalParameter) semanticObject);
                return;
            case TypesPackage.TFORMAL_PARAMETER:
                sequence_ColonSepTypeRef_DefaultFormalParameter_TFormalParameter(context, (TFormalParameter) semanticObject);
                return;
            case TypesPackage.TSTRUCT_FIELD:
                sequence_ColonSepTypeRef_TStructField(context, (TStructField) semanticObject);
                return;
            case TypesPackage.TSTRUCT_GETTER:
                sequence_ColonSepDeclaredTypeRef_TStructGetter(context, (TStructGetter) semanticObject);
                return;
            case TypesPackage.TSTRUCT_METHOD:
                sequence_ColonSepReturnTypeRef_TAnonymousFormalParameterList_TStructMethod_TypeVariables(context, (TStructMethod) semanticObject);
                return;
            case TypesPackage.TSTRUCT_SETTER:
                sequence_TStructSetter(context, (TStructSetter) semanticObject);
                return;
            case TypesPackage.TYPE_VARIABLE:
                sequence_TypeVariable(context, (TypeVariable) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : BindingElement(org.eclipse.n4js.n4JS.BindingElement) LabelledStatement(org.eclipse.n4js.n4JS.LabelledStatement) N4GetterDeclaration(org.eclipse.n4js.n4JS.N4GetterDeclaration) EmptyStatement(org.eclipse.n4js.n4JS.EmptyStatement) N4SetterDeclaration(org.eclipse.n4js.n4JS.N4SetterDeclaration) TFormalParameter(org.eclipse.n4js.ts.types.TFormalParameter) TStructField(org.eclipse.n4js.ts.types.TStructField) IfStatement(org.eclipse.n4js.n4JS.IfStatement) DefaultClause(org.eclipse.n4js.n4JS.DefaultClause) TryStatement(org.eclipse.n4js.n4JS.TryStatement) Wildcard(org.eclipse.n4js.ts.typeRefs.Wildcard) TypeVariable(org.eclipse.n4js.ts.types.TypeVariable) ThisTypeRefStructural(org.eclipse.n4js.ts.typeRefs.ThisTypeRefStructural) ReturnStatement(org.eclipse.n4js.n4JS.ReturnStatement) MultiplicativeExpression(org.eclipse.n4js.n4JS.MultiplicativeExpression) VersionedParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRef) JSXElement(org.eclipse.n4js.n4JS.JSXElement) AdditiveExpression(org.eclipse.n4js.n4JS.AdditiveExpression) RelationalExpression(org.eclipse.n4js.n4JS.RelationalExpression) ThisLiteral(org.eclipse.n4js.n4JS.ThisLiteral) FunctionTypeExpression(org.eclipse.n4js.ts.typeRefs.FunctionTypeExpression) ExportedVariableBinding(org.eclipse.n4js.n4JS.ExportedVariableBinding) NewExpression(org.eclipse.n4js.n4JS.NewExpression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) VersionedParameterizedTypeRefStructural(org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRefStructural) TStructSetter(org.eclipse.n4js.ts.types.TStructSetter) ArrayLiteral(org.eclipse.n4js.n4JS.ArrayLiteral) WithStatement(org.eclipse.n4js.n4JS.WithStatement) TStructGetter(org.eclipse.n4js.ts.types.TStructGetter) StringLiteral(org.eclipse.n4js.n4JS.StringLiteral) CatchBlock(org.eclipse.n4js.n4JS.CatchBlock) ParenExpression(org.eclipse.n4js.n4JS.ParenExpression) DoubleLiteral(org.eclipse.n4js.n4JS.DoubleLiteral) NullLiteral(org.eclipse.n4js.n4JS.NullLiteral) PropertySetterDeclaration(org.eclipse.n4js.n4JS.PropertySetterDeclaration) TemplateSegment(org.eclipse.n4js.n4JS.TemplateSegment) ExportedVariableDeclaration(org.eclipse.n4js.n4JS.ExportedVariableDeclaration) ArrayBindingPattern(org.eclipse.n4js.n4JS.ArrayBindingPattern) CaseClause(org.eclipse.n4js.n4JS.CaseClause) ExportSpecifier(org.eclipse.n4js.n4JS.ExportSpecifier) PromisifyExpression(org.eclipse.n4js.n4JS.PromisifyExpression) SuperLiteral(org.eclipse.n4js.n4JS.SuperLiteral) WhileStatement(org.eclipse.n4js.n4JS.WhileStatement) N4ClassDeclaration(org.eclipse.n4js.n4JS.N4ClassDeclaration) TStructMethod(org.eclipse.n4js.ts.types.TStructMethod) CommaExpression(org.eclipse.n4js.n4JS.CommaExpression) OctalIntLiteral(org.eclipse.n4js.n4JS.OctalIntLiteral) LegacyOctalIntLiteral(org.eclipse.n4js.n4JS.LegacyOctalIntLiteral) PropertyMethodDeclaration(org.eclipse.n4js.n4JS.PropertyMethodDeclaration) ForStatement(org.eclipse.n4js.n4JS.ForStatement) ContinueStatement(org.eclipse.n4js.n4JS.ContinueStatement) N4FieldDeclaration(org.eclipse.n4js.n4JS.N4FieldDeclaration) JSXPropertyAttribute(org.eclipse.n4js.n4JS.JSXPropertyAttribute) Annotation(org.eclipse.n4js.n4JS.Annotation) BreakStatement(org.eclipse.n4js.n4JS.BreakStatement) PropertyAssignmentAnnotationList(org.eclipse.n4js.n4JS.PropertyAssignmentAnnotationList) VariableStatement(org.eclipse.n4js.n4JS.VariableStatement) ExportedVariableStatement(org.eclipse.n4js.n4JS.ExportedVariableStatement) DefaultImportSpecifier(org.eclipse.n4js.n4JS.DefaultImportSpecifier) ImportDeclaration(org.eclipse.n4js.n4JS.ImportDeclaration) TFormalParameter(org.eclipse.n4js.ts.types.TFormalParameter) FormalParameter(org.eclipse.n4js.n4JS.FormalParameter) TAnonymousFormalParameter(org.eclipse.n4js.ts.types.TAnonymousFormalParameter) Parameter(org.eclipse.xtext.Parameter) ExportedVariableStatement(org.eclipse.n4js.n4JS.ExportedVariableStatement) VariableBinding(org.eclipse.n4js.n4JS.VariableBinding) ExportedVariableBinding(org.eclipse.n4js.n4JS.ExportedVariableBinding) DebuggerStatement(org.eclipse.n4js.n4JS.DebuggerStatement) ParameterizedPropertyAccessExpression(org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression) ParserRule(org.eclipse.xtext.ParserRule) RegularExpressionLiteral(org.eclipse.n4js.n4JS.RegularExpressionLiteral) HexIntLiteral(org.eclipse.n4js.n4JS.HexIntLiteral) PropertyNameValuePair(org.eclipse.n4js.n4JS.PropertyNameValuePair) ExpressionAnnotationList(org.eclipse.n4js.n4JS.ExpressionAnnotationList) EPackage(org.eclipse.emf.ecore.EPackage) SwitchStatement(org.eclipse.n4js.n4JS.SwitchStatement) LegacyOctalIntLiteral(org.eclipse.n4js.n4JS.LegacyOctalIntLiteral) IntLiteral(org.eclipse.n4js.n4JS.IntLiteral) OctalIntLiteral(org.eclipse.n4js.n4JS.OctalIntLiteral) HexIntLiteral(org.eclipse.n4js.n4JS.HexIntLiteral) ScientificIntLiteral(org.eclipse.n4js.n4JS.ScientificIntLiteral) LegacyOctalIntLiteral(org.eclipse.n4js.n4JS.LegacyOctalIntLiteral) BinaryIntLiteral(org.eclipse.n4js.n4JS.BinaryIntLiteral) LiteralOrComputedPropertyName(org.eclipse.n4js.n4JS.LiteralOrComputedPropertyName) N4EnumLiteral(org.eclipse.n4js.n4JS.N4EnumLiteral) EqualityExpression(org.eclipse.n4js.n4JS.EqualityExpression) ArrayElement(org.eclipse.n4js.n4JS.ArrayElement) BindingProperty(org.eclipse.n4js.n4JS.BindingProperty) VersionedIdentifierRef(org.eclipse.n4js.n4JS.VersionedIdentifierRef) IdentifierRef(org.eclipse.n4js.n4JS.IdentifierRef) IndexedAccessExpression(org.eclipse.n4js.n4JS.IndexedAccessExpression) Script(org.eclipse.n4js.n4JS.Script) NamedImportSpecifier(org.eclipse.n4js.n4JS.NamedImportSpecifier) VersionedParameterizedTypeRefStructural(org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRefStructural) ParameterizedTypeRefStructural(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRefStructural) FinallyBlock(org.eclipse.n4js.n4JS.FinallyBlock) ConditionalExpression(org.eclipse.n4js.n4JS.ConditionalExpression) NewTarget(org.eclipse.n4js.n4JS.NewTarget) ShiftExpression(org.eclipse.n4js.n4JS.ShiftExpression) ExportDeclaration(org.eclipse.n4js.n4JS.ExportDeclaration) TypeRefAnnotationArgument(org.eclipse.n4js.n4JS.TypeRefAnnotationArgument) ScientificIntLiteral(org.eclipse.n4js.n4JS.ScientificIntLiteral) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) VersionedParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRef) TAnonymousFormalParameter(org.eclipse.n4js.ts.types.TAnonymousFormalParameter) BinaryBitwiseExpression(org.eclipse.n4js.n4JS.BinaryBitwiseExpression) ArrayPadding(org.eclipse.n4js.n4JS.ArrayPadding) JSXSpreadAttribute(org.eclipse.n4js.n4JS.JSXSpreadAttribute) N4MethodDeclaration(org.eclipse.n4js.n4JS.N4MethodDeclaration) PropertyGetterDeclaration(org.eclipse.n4js.n4JS.PropertyGetterDeclaration) CatchBlock(org.eclipse.n4js.n4JS.CatchBlock) Block(org.eclipse.n4js.n4JS.Block) FinallyBlock(org.eclipse.n4js.n4JS.FinallyBlock) ObjectBindingPattern(org.eclipse.n4js.n4JS.ObjectBindingPattern) IntersectionTypeExpression(org.eclipse.n4js.ts.typeRefs.IntersectionTypeExpression) PostfixExpression(org.eclipse.n4js.n4JS.PostfixExpression) CastExpression(org.eclipse.n4js.n4JS.CastExpression) N4InterfaceDeclaration(org.eclipse.n4js.n4JS.N4InterfaceDeclaration) Action(org.eclipse.xtext.Action) JSXElementName(org.eclipse.n4js.n4JS.JSXElementName) Argument(org.eclipse.n4js.n4JS.Argument) LiteralAnnotationArgument(org.eclipse.n4js.n4JS.LiteralAnnotationArgument) TypeRefAnnotationArgument(org.eclipse.n4js.n4JS.TypeRefAnnotationArgument) DoStatement(org.eclipse.n4js.n4JS.DoStatement) JSXExpression(org.eclipse.n4js.n4JS.JSXExpression) BooleanLiteral(org.eclipse.n4js.n4JS.BooleanLiteral) VersionedIdentifierRef(org.eclipse.n4js.n4JS.VersionedIdentifierRef) PropertyNameValuePairSingleName(org.eclipse.n4js.n4JS.PropertyNameValuePairSingleName) UnaryExpression(org.eclipse.n4js.n4JS.UnaryExpression) AwaitExpression(org.eclipse.n4js.n4JS.AwaitExpression) FunctionDeclaration(org.eclipse.n4js.n4JS.FunctionDeclaration) LiteralAnnotationArgument(org.eclipse.n4js.n4JS.LiteralAnnotationArgument) BinaryLogicalExpression(org.eclipse.n4js.n4JS.BinaryLogicalExpression) FunctionExpression(org.eclipse.n4js.n4JS.FunctionExpression) AssignmentExpression(org.eclipse.n4js.n4JS.AssignmentExpression) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) VariableDeclaration(org.eclipse.n4js.n4JS.VariableDeclaration) ExportedVariableDeclaration(org.eclipse.n4js.n4JS.ExportedVariableDeclaration) ThrowStatement(org.eclipse.n4js.n4JS.ThrowStatement) TFormalParameter(org.eclipse.n4js.ts.types.TFormalParameter) FormalParameter(org.eclipse.n4js.n4JS.FormalParameter) TAnonymousFormalParameter(org.eclipse.n4js.ts.types.TAnonymousFormalParameter) ObjectLiteral(org.eclipse.n4js.n4JS.ObjectLiteral) YieldExpression(org.eclipse.n4js.n4JS.YieldExpression) NamespaceImportSpecifier(org.eclipse.n4js.n4JS.NamespaceImportSpecifier) ArrowFunction(org.eclipse.n4js.n4JS.ArrowFunction) UnionTypeExpression(org.eclipse.n4js.ts.typeRefs.UnionTypeExpression) N4EnumDeclaration(org.eclipse.n4js.n4JS.N4EnumDeclaration) ThisTypeRefNominal(org.eclipse.n4js.ts.typeRefs.ThisTypeRefNominal) N4MemberAnnotationList(org.eclipse.n4js.n4JS.N4MemberAnnotationList) AnnotationList(org.eclipse.n4js.n4JS.AnnotationList) ExpressionAnnotationList(org.eclipse.n4js.n4JS.ExpressionAnnotationList) N4MemberAnnotationList(org.eclipse.n4js.n4JS.N4MemberAnnotationList) PropertyAssignmentAnnotationList(org.eclipse.n4js.n4JS.PropertyAssignmentAnnotationList) ExpressionStatement(org.eclipse.n4js.n4JS.ExpressionStatement) N4ClassExpression(org.eclipse.n4js.n4JS.N4ClassExpression) TaggedTemplateString(org.eclipse.n4js.n4JS.TaggedTemplateString) TemplateLiteral(org.eclipse.n4js.n4JS.TemplateLiteral) CatchVariable(org.eclipse.n4js.n4JS.CatchVariable) BinaryIntLiteral(org.eclipse.n4js.n4JS.BinaryIntLiteral)

Example 3 with N4ClassDeclaration

use of org.eclipse.n4js.n4JS.N4ClassDeclaration in project n4js by eclipse.

the class InternalTypeSystem method applyRuleExpectedTypeOfArgument.

protected Result<TypeRef> applyRuleExpectedTypeOfArgument(final RuleEnvironment G, final RuleApplicationTrace _trace_, final Argument argument, final Expression argumentExpression) throws RuleFailedException {
    // output parameter
    TypeRef T = null;
    final EObject expr = argument.eContainer();
    if ((expr instanceof NewExpression)) {
        boolean _contains = ((NewExpression) expr).getArguments().contains(argument);
        boolean _not = (!_contains);
        if (_not) {
        } else {
            /* G |- expr.callee : var TypeTypeRef ctorTypeRef */
            Expression _callee = ((NewExpression) expr).getCallee();
            TypeTypeRef ctorTypeRef = null;
            Result<TypeRef> result = typeInternal(G, _trace_, _callee);
            checkAssignableTo(result.getFirst(), TypeTypeRef.class);
            ctorTypeRef = (TypeTypeRef) result.getFirst();
            TypeRef typeRefOfInstanceToCreate = this.typeSystemHelper.createTypeRefFromStaticType(G, ctorTypeRef, ((TypeArgument[]) Conversions.unwrapArray(((NewExpression) expr).getTypeArgs(), TypeArgument.class)));
            Type _declaredType = typeRefOfInstanceToCreate.getDeclaredType();
            ContainerType<?> typeOfInstanceToCreate = ((ContainerType<?>) _declaredType);
            final RuleEnvironment G2 = RuleEnvironmentExtensions.wrap(G);
            this.typeSystemHelper.addSubstitutions(G2, typeRefOfInstanceToCreate);
            RuleEnvironmentExtensions.addThisType(G2, typeRefOfInstanceToCreate);
            TMethod ctor = this.containerTypesHelper.fromContext(((NewExpression) expr).eResource()).findConstructor(typeOfInstanceToCreate);
            TFormalParameter _fparForArgIdx = null;
            if (ctor != null) {
                _fparForArgIdx = ctor.getFparForArgIdx(ECollections.indexOf(((NewExpression) expr).getArguments(), argument, 0));
            }
            final TFormalParameter fpar = _fparForArgIdx;
            if ((fpar == null)) {
                T = TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
            } else {
                final TypeRef paramType = fpar.getTypeRef();
                if ((paramType == null)) {
                    T = RuleEnvironmentExtensions.anyTypeRef(G2);
                } else {
                    /* G2 |- paramType ~> T */
                    Result<TypeArgument> result_1 = substTypeVariablesInternal(G2, _trace_, paramType);
                    checkAssignableTo(result_1.getFirst(), TypeRef.class);
                    T = (TypeRef) result_1.getFirst();
                }
            }
        }
    } else {
        if ((expr instanceof ParameterizedCallExpression)) {
            boolean _contains_1 = ((ParameterizedCallExpression) expr).getArguments().contains(argument);
            /* expr.arguments.contains(argument) */
            if (!_contains_1) {
                sneakyThrowRuleFailedException("expr.arguments.contains(argument)");
            }
            /* G |- expr.target : var TypeRef targetTypeRef */
            Expression _target = ((ParameterizedCallExpression) expr).getTarget();
            TypeRef targetTypeRef = null;
            Result<TypeRef> result_2 = typeInternal(G, _trace_, _target);
            checkAssignableTo(result_2.getFirst(), TypeRef.class);
            targetTypeRef = (TypeRef) result_2.getFirst();
            if ((targetTypeRef instanceof FunctionTypeExprOrRef)) {
                final FunctionTypeExprOrRef F = ((FunctionTypeExprOrRef) targetTypeRef);
                final int argIndex = ECollections.indexOf(((ParameterizedCallExpression) expr).getArguments(), argument, 0);
                final TFormalParameter fpar_1 = F.getFparForArgIdx(argIndex);
                if ((fpar_1 == null)) {
                    T = TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
                } else {
                    final TypeRef paramType_1 = fpar_1.getTypeRef();
                    if ((paramType_1 == null)) {
                        T = RuleEnvironmentExtensions.anyTypeRef(G);
                    } else {
                        final RuleEnvironment G2_1 = RuleEnvironmentExtensions.wrap(G);
                        this.typeSystemHelper.addSubstitutions(G2_1, ((ParameterizedCallExpression) expr), F);
                        Expression _target_1 = ((ParameterizedCallExpression) expr).getTarget();
                        if ((_target_1 instanceof SuperLiteral)) {
                            N4ClassDeclaration _containerOfType = EcoreUtil2.<N4ClassDeclaration>getContainerOfType(expr, N4ClassDeclaration.class);
                            Type _definedType = null;
                            if (_containerOfType != null) {
                                _definedType = _containerOfType.getDefinedType();
                            }
                            final Type containingClass = _definedType;
                            if ((containingClass instanceof TClass)) {
                                RuleEnvironmentExtensions.addThisType(G2_1, TypeExtensions.ref(containingClass));
                                ParameterizedTypeRef _superClassRef = ((TClass) containingClass).getSuperClassRef();
                                boolean _tripleNotEquals = (_superClassRef != null);
                                if (_tripleNotEquals) {
                                    this.typeSystemHelper.addSubstitutions(G2_1, ((TClass) containingClass).getSuperClassRef());
                                }
                                if ((paramType_1 instanceof ThisTypeRefStructural)) {
                                    RuleEnvironmentExtensions.addThisType(G2_1, ((TClass) containingClass).getSuperClassRef());
                                }
                            }
                        }
                        /* G2 |- paramType ~> T */
                        Result<TypeArgument> result_3 = substTypeVariablesInternal(G2_1, _trace_, paramType_1);
                        checkAssignableTo(result_3.getFirst(), TypeRef.class);
                        T = (TypeRef) result_3.getFirst();
                    }
                }
            } else {
                T = TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
            }
        }
    }
    return new Result<TypeRef>(T);
}
Also used : TMethod(org.eclipse.n4js.ts.types.TMethod) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) NewExpression(org.eclipse.n4js.n4JS.NewExpression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) SuperLiteral(org.eclipse.n4js.n4JS.SuperLiteral) N4ClassDeclaration(org.eclipse.n4js.n4JS.N4ClassDeclaration) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult) TFormalParameter(org.eclipse.n4js.ts.types.TFormalParameter) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) Type(org.eclipse.n4js.ts.types.Type) PrimitiveType(org.eclipse.n4js.ts.types.PrimitiveType) VoidType(org.eclipse.n4js.ts.types.VoidType) AnyType(org.eclipse.n4js.ts.types.AnyType) ModuleNamespaceVirtualType(org.eclipse.n4js.ts.types.ModuleNamespaceVirtualType) NullType(org.eclipse.n4js.ts.types.NullType) UndefinedType(org.eclipse.n4js.ts.types.UndefinedType) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TStructuralType(org.eclipse.n4js.ts.types.TStructuralType) BinaryBitwiseExpression(org.eclipse.n4js.n4JS.BinaryBitwiseExpression) AssignmentExpression(org.eclipse.n4js.n4JS.AssignmentExpression) IndexedAccessExpression(org.eclipse.n4js.n4JS.IndexedAccessExpression) UnionTypeExpression(org.eclipse.n4js.ts.typeRefs.UnionTypeExpression) FunctionExpression(org.eclipse.n4js.n4JS.FunctionExpression) PromisifyExpression(org.eclipse.n4js.n4JS.PromisifyExpression) UnaryExpression(org.eclipse.n4js.n4JS.UnaryExpression) ParenExpression(org.eclipse.n4js.n4JS.ParenExpression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) AdditiveExpression(org.eclipse.n4js.n4JS.AdditiveExpression) PostfixExpression(org.eclipse.n4js.n4JS.PostfixExpression) YieldExpression(org.eclipse.n4js.n4JS.YieldExpression) ConditionalExpression(org.eclipse.n4js.n4JS.ConditionalExpression) FunctionTypeExpression(org.eclipse.n4js.ts.typeRefs.FunctionTypeExpression) RelationalExpression(org.eclipse.n4js.n4JS.RelationalExpression) NewExpression(org.eclipse.n4js.n4JS.NewExpression) IntersectionTypeExpression(org.eclipse.n4js.ts.typeRefs.IntersectionTypeExpression) AwaitExpression(org.eclipse.n4js.n4JS.AwaitExpression) CommaExpression(org.eclipse.n4js.n4JS.CommaExpression) Expression(org.eclipse.n4js.n4JS.Expression) CastExpression(org.eclipse.n4js.n4JS.CastExpression) BinaryLogicalExpression(org.eclipse.n4js.n4JS.BinaryLogicalExpression) EqualityExpression(org.eclipse.n4js.n4JS.EqualityExpression) ShiftExpression(org.eclipse.n4js.n4JS.ShiftExpression) ParameterizedPropertyAccessExpression(org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression) MultiplicativeExpression(org.eclipse.n4js.n4JS.MultiplicativeExpression) N4ClassExpression(org.eclipse.n4js.n4JS.N4ClassExpression) EObject(org.eclipse.emf.ecore.EObject) ThisTypeRefStructural(org.eclipse.n4js.ts.typeRefs.ThisTypeRefStructural) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) RuleEnvironment(org.eclipse.xsemantics.runtime.RuleEnvironment) FunctionTypeExprOrRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeExprOrRef) TClass(org.eclipse.n4js.ts.types.TClass)

Example 4 with N4ClassDeclaration

use of org.eclipse.n4js.n4JS.N4ClassDeclaration in project n4js by eclipse.

the class InternalTypeSystem method applyRuleThisTypeRefEObject.

protected Result<TypeRef> applyRuleThisTypeRefEObject(final RuleEnvironment G, final RuleApplicationTrace _trace_, final EObject location) throws RuleFailedException {
    // output parameter
    TypeRef T = null;
    final FunctionOrFieldAccessor containingFunctionOrAccessor = N4JSASTUtils.getContainingFunctionOrAccessor(location);
    boolean _matched = false;
    if (containingFunctionOrAccessor instanceof ArrowFunction) {
        _matched = true;
        /* G |~ containingFunctionOrAccessor ~> T */
        Result<TypeRef> result = thisTypeRefInternal(G, _trace_, ((ArrowFunction) containingFunctionOrAccessor));
        checkAssignableTo(result.getFirst(), TypeRef.class);
        T = (TypeRef) result.getFirst();
    }
    if (!_matched) {
        IdentifiableElement _definedFunctionOrAccessor = null;
        if (containingFunctionOrAccessor != null) {
            _definedFunctionOrAccessor = containingFunctionOrAccessor.getDefinedFunctionOrAccessor();
        }
        final IdentifiableElement containingTFunctionOrAccessor = _definedFunctionOrAccessor;
        final TypeRef declaredThisType = TypeSystemHelper.declaredThisType(containingTFunctionOrAccessor);
        if ((declaredThisType != null)) {
            if ((declaredThisType instanceof ParameterizedTypeRef)) {
                /* G |~ declaredThisType ~> T */
                Result<TypeRef> result = thisTypeRefInternal(G, _trace_, ((ParameterizedTypeRef) declaredThisType));
                checkAssignableTo(result.getFirst(), TypeRef.class);
                T = (TypeRef) result.getFirst();
            } else {
                T = declaredThisType;
            }
        } else {
            final ThisTarget thisTarget = N4JSASTUtils.getProbableThisTarget(location);
            boolean _matched_1 = false;
            if (thisTarget instanceof ObjectLiteral) {
                _matched_1 = true;
                /* G |- thisTarget: T */
                Result<TypeRef> result_1 = typeInternal(G, _trace_, ((ObjectLiteral) thisTarget));
                checkAssignableTo(result_1.getFirst(), TypeRef.class);
                T = (TypeRef) result_1.getFirst();
            }
            if (!_matched_1) {
                if (thisTarget instanceof N4ClassifierDefinition) {
                    _matched_1 = true;
                    Type thisTargetDEFTYPE = ((N4ClassifierDefinition) thisTarget).getDefinedType();
                    if ((thisTarget instanceof N4ClassDeclaration)) {
                        final TClass clazz = ((N4ClassDeclaration) thisTarget).getDefinedTypeAsClass();
                        if (((clazz != null) && clazz.isStaticPolyfill())) {
                            final Type actualClazz = clazz.getSuperClassRef().getDeclaredType();
                            if ((actualClazz != null)) {
                                thisTargetDEFTYPE = actualClazz;
                            }
                        }
                    }
                    if ((thisTargetDEFTYPE != null)) {
                        final FunctionDefinition containingFunction = N4JSASTUtils.getContainingFunction(location);
                        if (((containingFunction instanceof N4MethodDeclaration) && ((N4MemberDeclaration) containingFunction).isStatic())) {
                            boolean _isInReturnDeclaration_Of_StaticMethod = RuleEnvironmentExtensions.isInReturnDeclaration_Of_StaticMethod(location, ((N4MethodDeclaration) containingFunction));
                            if (_isInReturnDeclaration_Of_StaticMethod) {
                                /* G |~ thisTargetDEFTYPE.ref ~> T */
                                TypeRef _ref = TypeExtensions.ref(thisTargetDEFTYPE);
                                Result<TypeRef> result_1 = thisTypeRefInternal(G, _trace_, _ref);
                                checkAssignableTo(result_1.getFirst(), TypeRef.class);
                                T = (TypeRef) result_1.getFirst();
                            } else {
                                boolean _isInBody_Of_StaticMethod = RuleEnvironmentExtensions.isInBody_Of_StaticMethod(location, ((N4MethodDeclaration) containingFunction));
                                if (_isInBody_Of_StaticMethod) {
                                    T = TypeUtils.createClassifierBoundThisTypeRef(TypeUtils.createTypeTypeRef(TypeExtensions.ref(thisTargetDEFTYPE), false));
                                } else {
                                    T = TypeUtils.createConstructorTypeRef(thisTargetDEFTYPE);
                                }
                            }
                        } else {
                            final N4FieldDeclaration n4Field = EcoreUtil2.<N4FieldDeclaration>getContainerOfType(location, N4FieldDeclaration.class);
                            if (((n4Field != null) && n4Field.isStatic())) {
                                T = TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
                            } else {
                                final N4GetterDeclaration n4Getter = EcoreUtil2.<N4GetterDeclaration>getContainerOfType(location, N4GetterDeclaration.class);
                                if (((n4Getter != null) && n4Getter.isStatic())) {
                                    T = TypeUtils.createConstructorTypeRef(thisTargetDEFTYPE);
                                } else {
                                    final N4SetterDeclaration n4Setter = EcoreUtil2.<N4SetterDeclaration>getContainerOfType(location, N4SetterDeclaration.class);
                                    if (((n4Setter != null) && n4Setter.isStatic())) {
                                        T = TypeUtils.createConstructorTypeRef(thisTargetDEFTYPE);
                                    } else {
                                        /* G |~ thisTargetDEFTYPE.ref ~> T */
                                        TypeRef _ref_1 = TypeExtensions.ref(thisTargetDEFTYPE);
                                        Result<TypeRef> result_2 = thisTypeRefInternal(G, _trace_, _ref_1);
                                        checkAssignableTo(result_2.getFirst(), TypeRef.class);
                                        T = (TypeRef) result_2.getFirst();
                                    }
                                }
                            }
                        }
                    } else {
                        T = RuleEnvironmentExtensions.anyTypeRefDynamic(G);
                    }
                }
            }
            if (!_matched_1) {
                boolean _hasGlobalObject = this.jsVariantHelper.hasGlobalObject(location);
                if (_hasGlobalObject) {
                    T = RuleEnvironmentExtensions.globalObjectTypeRef(G);
                } else {
                    T = RuleEnvironmentExtensions.undefinedTypeRef(G);
                }
            }
        }
    }
    return new Result<TypeRef>(T);
}
Also used : ObjectLiteral(org.eclipse.n4js.n4JS.ObjectLiteral) FunctionOrFieldAccessor(org.eclipse.n4js.n4JS.FunctionOrFieldAccessor) N4FieldDeclaration(org.eclipse.n4js.n4JS.N4FieldDeclaration) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) N4GetterDeclaration(org.eclipse.n4js.n4JS.N4GetterDeclaration) ArrowFunction(org.eclipse.n4js.n4JS.ArrowFunction) IdentifiableElement(org.eclipse.n4js.ts.types.IdentifiableElement) N4MemberDeclaration(org.eclipse.n4js.n4JS.N4MemberDeclaration) N4ClassDeclaration(org.eclipse.n4js.n4JS.N4ClassDeclaration) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) N4SetterDeclaration(org.eclipse.n4js.n4JS.N4SetterDeclaration) Type(org.eclipse.n4js.ts.types.Type) PrimitiveType(org.eclipse.n4js.ts.types.PrimitiveType) VoidType(org.eclipse.n4js.ts.types.VoidType) AnyType(org.eclipse.n4js.ts.types.AnyType) ModuleNamespaceVirtualType(org.eclipse.n4js.ts.types.ModuleNamespaceVirtualType) NullType(org.eclipse.n4js.ts.types.NullType) UndefinedType(org.eclipse.n4js.ts.types.UndefinedType) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TStructuralType(org.eclipse.n4js.ts.types.TStructuralType) N4ClassifierDefinition(org.eclipse.n4js.n4JS.N4ClassifierDefinition) N4MethodDeclaration(org.eclipse.n4js.n4JS.N4MethodDeclaration) FunctionDefinition(org.eclipse.n4js.n4JS.FunctionDefinition) TClass(org.eclipse.n4js.ts.types.TClass) ThisTarget(org.eclipse.n4js.n4JS.ThisTarget)

Example 5 with N4ClassDeclaration

use of org.eclipse.n4js.n4JS.N4ClassDeclaration in project n4js by eclipse.

the class InternalTypeSystem method applyRuleTypePropertyAccessExpression.

protected Result<TypeRef> applyRuleTypePropertyAccessExpression(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ParameterizedPropertyAccessExpression expr) throws RuleFailedException {
    // output parameter
    TypeRef T = null;
    /* { T = env(G, GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION -> expr, TypeRef) } or { val G2 = G.wrap G2.add(GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION -> expr, G2.anyTypeRef) G2 |- expr.target : var TypeRef receiverTypeRef typeSystemHelper.addSubstitutions(G2,receiverTypeRef) G2.addThisType(receiverTypeRef) if (! (receiverTypeRef instanceof UnknownTypeRef) && (expr.target instanceof SuperLiteral || expr.target instanceof ThisLiteral) ) { var containingClass = EcoreUtil2.getContainerOfType(expr,N4ClassDeclaration)?.definedType; if (containingClass instanceof TClass) { if (containingClass.isStaticPolyfill) { containingClass = containingClass.superClassRef?.declaredType } if (containingClass instanceof TClass) { if (containingClass?.superClassRef!==null) { typeSystemHelper.addSubstitutions(G2, containingClass.superClassRef) } } } } val prop = expr.property; var TypeRef propTypeRef; if(prop instanceof TMethod && (prop as TMethod).isConstructor) { val TypeArgument ctorTypeArg = switch(receiverTypeRef) { TypeTypeRef: G.functionTypeRef ParameterizedTypeRef, BoundThisTypeRef: { val declType = if(receiverTypeRef instanceof BoundThisTypeRef) { receiverTypeRef.actualThisTypeRef?.declaredType } else { receiverTypeRef.declaredType }; val finalCtorSig = if(declType instanceof TClassifier) N4JSLanguageUtils.hasCovariantConstructor(declType); if(finalCtorSig) { declType.ref } else if(declType!==null) { TypeUtils.createWildcardExtends(declType.ref) } else { null } } }; propTypeRef = if(ctorTypeArg!==null) { TypeUtils.createTypeTypeRef(ctorTypeArg, true) } else { TypeRefsFactory.eINSTANCE.createUnknownTypeRef }; } else if(receiverTypeRef.dynamic && prop!==null && prop.eIsProxy) { propTypeRef = G.anyTypeRefDynamic; } else { G2.wrap |- prop : propTypeRef if(expr.parameterized) { typeSystemHelper.addSubstitutions(G2,expr); } } G2 |- propTypeRef ~> T T = versionResolver.resolveVersion(T, receiverTypeRef); if (expr.target instanceof SuperLiteral && T instanceof FunctionTypeExprOrRef ) { val F = T as FunctionTypeExprOrRef; if ((T as FunctionTypeExprOrRef).returnTypeRef instanceof BoundThisTypeRef) { var TypeRef rawT; G |~ expr ~> rawT; val thisTypeRef = TypeUtils.enforceNominalTyping(rawT); if (T instanceof FunctionTypeExpression && T.eContainer===null) { val fte = T as FunctionTypeExpression fte.returnTypeRef = TypeUtils.copyIfContained(thisTypeRef); } else { T = TypeUtils.createFunctionTypeExpression(null, F.typeVars, F.fpars, thisTypeRef); } } } } */
    {
        RuleFailedException previousFailure = null;
        try {
            Pair<String, ParameterizedPropertyAccessExpression> _mappedTo = Pair.<String, ParameterizedPropertyAccessExpression>of(RuleEnvironmentExtensions.GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION, expr);
            T = this.<TypeRef>env(G, _mappedTo, TypeRef.class);
        } catch (Exception e) {
            previousFailure = extractRuleFailedException(e);
            final RuleEnvironment G2 = RuleEnvironmentExtensions.wrap(G);
            Pair<String, ParameterizedPropertyAccessExpression> _mappedTo_1 = Pair.<String, ParameterizedPropertyAccessExpression>of(RuleEnvironmentExtensions.GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION, expr);
            boolean _add = G2.add(_mappedTo_1, RuleEnvironmentExtensions.anyTypeRef(G2));
            /* G2.add(GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION -> expr, G2.anyTypeRef) */
            if (!_add) {
                sneakyThrowRuleFailedException("G2.add(GUARD_TYPE_PROPERTY_ACCESS_EXPRESSION -> expr, G2.anyTypeRef)");
            }
            /* G2 |- expr.target : var TypeRef receiverTypeRef */
            Expression _target = expr.getTarget();
            TypeRef receiverTypeRef = null;
            Result<TypeRef> result = typeInternal(G2, _trace_, _target);
            checkAssignableTo(result.getFirst(), TypeRef.class);
            receiverTypeRef = (TypeRef) result.getFirst();
            this.typeSystemHelper.addSubstitutions(G2, receiverTypeRef);
            RuleEnvironmentExtensions.addThisType(G2, receiverTypeRef);
            if (((!(receiverTypeRef instanceof UnknownTypeRef)) && ((expr.getTarget() instanceof SuperLiteral) || (expr.getTarget() instanceof ThisLiteral)))) {
                N4ClassDeclaration _containerOfType = EcoreUtil2.<N4ClassDeclaration>getContainerOfType(expr, N4ClassDeclaration.class);
                Type _definedType = null;
                if (_containerOfType != null) {
                    _definedType = _containerOfType.getDefinedType();
                }
                Type containingClass = _definedType;
                if ((containingClass instanceof TClass)) {
                    boolean _isStaticPolyfill = ((TClass) containingClass).isStaticPolyfill();
                    if (_isStaticPolyfill) {
                        ParameterizedTypeRef _superClassRef = ((TClass) containingClass).getSuperClassRef();
                        Type _declaredType = null;
                        if (_superClassRef != null) {
                            _declaredType = _superClassRef.getDeclaredType();
                        }
                        containingClass = _declaredType;
                    }
                    if ((containingClass instanceof TClass)) {
                        ParameterizedTypeRef _superClassRef_1 = null;
                        if (((TClass) containingClass) != null) {
                            _superClassRef_1 = ((TClass) containingClass).getSuperClassRef();
                        }
                        boolean _tripleNotEquals = (_superClassRef_1 != null);
                        if (_tripleNotEquals) {
                            this.typeSystemHelper.addSubstitutions(G2, ((TClass) containingClass).getSuperClassRef());
                        }
                    }
                }
            }
            final IdentifiableElement prop = expr.getProperty();
            TypeRef propTypeRef = null;
            if (((prop instanceof TMethod) && ((TMethod) prop).isConstructor())) {
                TypeArgument _switchResult = null;
                boolean _matched = false;
                if (receiverTypeRef instanceof TypeTypeRef) {
                    _matched = true;
                    _switchResult = RuleEnvironmentExtensions.functionTypeRef(G);
                }
                if (!_matched) {
                    if (receiverTypeRef instanceof ParameterizedTypeRef) {
                        _matched = true;
                    }
                    if (!_matched) {
                        if (receiverTypeRef instanceof BoundThisTypeRef) {
                            _matched = true;
                        }
                    }
                    if (_matched) {
                        TypeArgument _xblockexpression = null;
                        {
                            Type _xifexpression = null;
                            if ((receiverTypeRef instanceof BoundThisTypeRef)) {
                                ParameterizedTypeRef _actualThisTypeRef = ((BoundThisTypeRef) receiverTypeRef).getActualThisTypeRef();
                                Type _declaredType_1 = null;
                                if (_actualThisTypeRef != null) {
                                    _declaredType_1 = _actualThisTypeRef.getDeclaredType();
                                }
                                _xifexpression = _declaredType_1;
                            } else {
                                _xifexpression = ((BaseTypeRef) receiverTypeRef).getDeclaredType();
                            }
                            final Type declType = _xifexpression;
                            boolean _xifexpression_1 = false;
                            if ((declType instanceof TClassifier)) {
                                _xifexpression_1 = N4JSLanguageUtils.hasCovariantConstructor(((TClassifier) declType));
                            }
                            final boolean finalCtorSig = _xifexpression_1;
                            TypeArgument _xifexpression_2 = null;
                            if (finalCtorSig) {
                                _xifexpression_2 = TypeExtensions.ref(declType);
                            } else {
                                Wildcard _xifexpression_3 = null;
                                if ((declType != null)) {
                                    _xifexpression_3 = TypeUtils.createWildcardExtends(TypeExtensions.ref(declType));
                                } else {
                                    _xifexpression_3 = null;
                                }
                                _xifexpression_2 = _xifexpression_3;
                            }
                            _xblockexpression = (_xifexpression_2);
                        }
                        _switchResult = _xblockexpression;
                    }
                }
                final TypeArgument ctorTypeArg = _switchResult;
                TypeRef _xifexpression = null;
                if ((ctorTypeArg != null)) {
                    _xifexpression = TypeUtils.createTypeTypeRef(ctorTypeArg, true);
                } else {
                    _xifexpression = TypeRefsFactory.eINSTANCE.createUnknownTypeRef();
                }
                propTypeRef = _xifexpression;
            } else {
                if (((receiverTypeRef.isDynamic() && (prop != null)) && prop.eIsProxy())) {
                    propTypeRef = RuleEnvironmentExtensions.anyTypeRefDynamic(G);
                } else {
                    /* G2.wrap |- prop : propTypeRef */
                    RuleEnvironment _wrap = RuleEnvironmentExtensions.wrap(G2);
                    Result<TypeRef> result_1 = typeInternal(_wrap, _trace_, prop);
                    checkAssignableTo(result_1.getFirst(), TypeRef.class);
                    propTypeRef = (TypeRef) result_1.getFirst();
                    boolean _isParameterized = expr.isParameterized();
                    if (_isParameterized) {
                        this.typeSystemHelper.addSubstitutions(G2, expr);
                    }
                }
            }
            /* G2 |- propTypeRef ~> T */
            Result<TypeArgument> result_2 = substTypeVariablesInternal(G2, _trace_, propTypeRef);
            checkAssignableTo(result_2.getFirst(), TypeRef.class);
            T = (TypeRef) result_2.getFirst();
            T = this.versionResolver.<TypeRef, TypeRef>resolveVersion(T, receiverTypeRef);
            if (((expr.getTarget() instanceof SuperLiteral) && (T instanceof FunctionTypeExprOrRef))) {
                final FunctionTypeExprOrRef F = ((FunctionTypeExprOrRef) T);
                TypeRef _returnTypeRef = ((FunctionTypeExprOrRef) T).getReturnTypeRef();
                if ((_returnTypeRef instanceof BoundThisTypeRef)) {
                    TypeRef rawT = null;
                    /* G |~ expr ~> rawT */
                    Result<TypeRef> result_3 = thisTypeRefInternal(G, _trace_, expr);
                    checkAssignableTo(result_3.getFirst(), TypeRef.class);
                    rawT = (TypeRef) result_3.getFirst();
                    final TypeRef thisTypeRef = TypeUtils.enforceNominalTyping(rawT);
                    if (((T instanceof FunctionTypeExpression) && (T.eContainer() == null))) {
                        final FunctionTypeExpression fte = ((FunctionTypeExpression) T);
                        fte.setReturnTypeRef(TypeUtils.<TypeRef>copyIfContained(thisTypeRef));
                    } else {
                        T = TypeUtils.createFunctionTypeExpression(null, F.getTypeVars(), F.getFpars(), thisTypeRef);
                    }
                }
            }
        }
    }
    return new Result<TypeRef>(T);
}
Also used : ParameterizedPropertyAccessExpression(org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression) TClassifier(org.eclipse.n4js.ts.types.TClassifier) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) SuperLiteral(org.eclipse.n4js.n4JS.SuperLiteral) TaggedTemplateString(org.eclipse.n4js.n4JS.TaggedTemplateString) RuleFailedException(org.eclipse.xsemantics.runtime.RuleFailedException) N4ClassDeclaration(org.eclipse.n4js.n4JS.N4ClassDeclaration) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) Wildcard(org.eclipse.n4js.ts.typeRefs.Wildcard) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) RuleEnvironment(org.eclipse.xsemantics.runtime.RuleEnvironment) Pair(org.eclipse.xtext.xbase.lib.Pair) PropertyNameValuePair(org.eclipse.n4js.n4JS.PropertyNameValuePair) ThisLiteral(org.eclipse.n4js.n4JS.ThisLiteral) TMethod(org.eclipse.n4js.ts.types.TMethod) FunctionTypeExpression(org.eclipse.n4js.ts.typeRefs.FunctionTypeExpression) IdentifiableElement(org.eclipse.n4js.ts.types.IdentifiableElement) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) RuleFailedException(org.eclipse.xsemantics.runtime.RuleFailedException) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) Type(org.eclipse.n4js.ts.types.Type) PrimitiveType(org.eclipse.n4js.ts.types.PrimitiveType) VoidType(org.eclipse.n4js.ts.types.VoidType) AnyType(org.eclipse.n4js.ts.types.AnyType) ModuleNamespaceVirtualType(org.eclipse.n4js.ts.types.ModuleNamespaceVirtualType) NullType(org.eclipse.n4js.ts.types.NullType) UndefinedType(org.eclipse.n4js.ts.types.UndefinedType) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TStructuralType(org.eclipse.n4js.ts.types.TStructuralType) BinaryBitwiseExpression(org.eclipse.n4js.n4JS.BinaryBitwiseExpression) AssignmentExpression(org.eclipse.n4js.n4JS.AssignmentExpression) IndexedAccessExpression(org.eclipse.n4js.n4JS.IndexedAccessExpression) UnionTypeExpression(org.eclipse.n4js.ts.typeRefs.UnionTypeExpression) FunctionExpression(org.eclipse.n4js.n4JS.FunctionExpression) PromisifyExpression(org.eclipse.n4js.n4JS.PromisifyExpression) UnaryExpression(org.eclipse.n4js.n4JS.UnaryExpression) ParenExpression(org.eclipse.n4js.n4JS.ParenExpression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) AdditiveExpression(org.eclipse.n4js.n4JS.AdditiveExpression) PostfixExpression(org.eclipse.n4js.n4JS.PostfixExpression) YieldExpression(org.eclipse.n4js.n4JS.YieldExpression) ConditionalExpression(org.eclipse.n4js.n4JS.ConditionalExpression) FunctionTypeExpression(org.eclipse.n4js.ts.typeRefs.FunctionTypeExpression) RelationalExpression(org.eclipse.n4js.n4JS.RelationalExpression) NewExpression(org.eclipse.n4js.n4JS.NewExpression) IntersectionTypeExpression(org.eclipse.n4js.ts.typeRefs.IntersectionTypeExpression) AwaitExpression(org.eclipse.n4js.n4JS.AwaitExpression) CommaExpression(org.eclipse.n4js.n4JS.CommaExpression) Expression(org.eclipse.n4js.n4JS.Expression) CastExpression(org.eclipse.n4js.n4JS.CastExpression) BinaryLogicalExpression(org.eclipse.n4js.n4JS.BinaryLogicalExpression) EqualityExpression(org.eclipse.n4js.n4JS.EqualityExpression) ShiftExpression(org.eclipse.n4js.n4JS.ShiftExpression) ParameterizedPropertyAccessExpression(org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression) MultiplicativeExpression(org.eclipse.n4js.n4JS.MultiplicativeExpression) N4ClassExpression(org.eclipse.n4js.n4JS.N4ClassExpression) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) FunctionTypeExprOrRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeExprOrRef) TClass(org.eclipse.n4js.ts.types.TClass)

Aggregations

N4ClassDeclaration (org.eclipse.n4js.n4JS.N4ClassDeclaration)5 ParameterizedTypeRef (org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef)4 TypeTypeRef (org.eclipse.n4js.ts.typeRefs.TypeTypeRef)4 AdditiveExpression (org.eclipse.n4js.n4JS.AdditiveExpression)3 AssignmentExpression (org.eclipse.n4js.n4JS.AssignmentExpression)3 AwaitExpression (org.eclipse.n4js.n4JS.AwaitExpression)3 BinaryBitwiseExpression (org.eclipse.n4js.n4JS.BinaryBitwiseExpression)3 BinaryLogicalExpression (org.eclipse.n4js.n4JS.BinaryLogicalExpression)3 CastExpression (org.eclipse.n4js.n4JS.CastExpression)3 CommaExpression (org.eclipse.n4js.n4JS.CommaExpression)3 ConditionalExpression (org.eclipse.n4js.n4JS.ConditionalExpression)3 EqualityExpression (org.eclipse.n4js.n4JS.EqualityExpression)3 FunctionExpression (org.eclipse.n4js.n4JS.FunctionExpression)3 IndexedAccessExpression (org.eclipse.n4js.n4JS.IndexedAccessExpression)3 MultiplicativeExpression (org.eclipse.n4js.n4JS.MultiplicativeExpression)3 N4ClassExpression (org.eclipse.n4js.n4JS.N4ClassExpression)3 NewExpression (org.eclipse.n4js.n4JS.NewExpression)3 ParameterizedCallExpression (org.eclipse.n4js.n4JS.ParameterizedCallExpression)3 ParameterizedPropertyAccessExpression (org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression)3 ParenExpression (org.eclipse.n4js.n4JS.ParenExpression)3