Search in sources :

Example 1 with RealLiteral

use of org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.RealLiteral in project xtext-core by eclipse.

the class Bug297105TestLanguageSemanticSequencer 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 == Bug297105TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug297105TestLanguagePackage.EXPRESSION:
                sequence_Expression(context, (Expression) semanticObject);
                return;
            case Bug297105TestLanguagePackage.INT_LITERAL:
                sequence_IntLiteral(context, (IntLiteral) semanticObject);
                return;
            case Bug297105TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug297105TestLanguagePackage.REAL_LITERAL:
                sequence_RealLiteral(context, (RealLiteral) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) RealLiteral(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.RealLiteral) Action(org.eclipse.xtext.Action) Expression(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Expression) Model(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) IntLiteral(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.IntLiteral) 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 Expression (org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Expression)1 IntLiteral (org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.IntLiteral)1 Model (org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Model)1 RealLiteral (org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.RealLiteral)1