use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel in project xtext-core by eclipse.
the class ExUnorderedGroupsTestLanguageSemanticSequencer 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 == UnorderedGroupsTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case UnorderedGroupsTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.NESTED_MODEL:
sequence_NestedModel(context, (NestedModel) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.UNORDERED_SERIALIZATION:
sequence_UnorderedSerialization(context, (UnorderedSerialization) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel in project xtext-core by eclipse.
the class SimpleUnorderedGroupsTestLanguageSemanticSequencer 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 == UnorderedGroupsTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case UnorderedGroupsTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.NESTED_MODEL:
sequence_NestedModel(context, (NestedModel) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.UNORDERED_SERIALIZATION:
sequence_UnorderedSerialization(context, (UnorderedSerialization) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel in project xtext-core by eclipse.
the class UnorderedGroupsTestLanguageSemanticSequencer 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 == UnorderedGroupsTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case UnorderedGroupsTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.NESTED_MODEL:
sequence_NestedModel(context, (NestedModel) semanticObject);
return;
case UnorderedGroupsTestLanguagePackage.UNORDERED_SERIALIZATION:
sequence_UnorderedSerialization(context, (UnorderedSerialization) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel in project xtext-core by eclipse.
the class AbstractParserTest method internalTestNested.
public void internalTestNested(String input, int expected) throws Exception {
Model model = (Model) getModel("bug302585 " + input);
assertNotNull(model);
List<NestedModel> nestedModels = model.getNestedModel();
assertEquals(expected, nestedModels.size());
for (NestedModel nested : nestedModels) {
assertTrue(nested.isFirst());
assertTrue(nested.isSecond());
}
}
Aggregations