Search in sources :

Example 1 with Variable

use of org.eclipse.xtext.parser.antlr.bug296889Test.Variable in project xtext-core by eclipse.

the class Bug296889TestLanguageSemanticSequencer 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 == Bug296889TestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug296889TestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug296889TestPackage.POSTOP:
                sequence_Postop(context, (Postop) semanticObject);
                return;
            case Bug296889TestPackage.PREOP:
                sequence_Preop(context, (Preop) semanticObject);
                return;
            case Bug296889TestPackage.VARIABLE:
                sequence_Variable(context, (Variable) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Variable(org.eclipse.xtext.parser.antlr.bug296889Test.Variable) Postop(org.eclipse.xtext.parser.antlr.bug296889Test.Postop) Model(org.eclipse.xtext.parser.antlr.bug296889Test.Model) Preop(org.eclipse.xtext.parser.antlr.bug296889Test.Preop) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Model (org.eclipse.xtext.parser.antlr.bug296889Test.Model)1 Postop (org.eclipse.xtext.parser.antlr.bug296889Test.Postop)1 Preop (org.eclipse.xtext.parser.antlr.bug296889Test.Preop)1 Variable (org.eclipse.xtext.parser.antlr.bug296889Test.Variable)1