use of org.eclipse.xtext.parsetree.unassignedtext.services.UnassignedTextTestLanguageGrammarAccess in project xtext-core by eclipse.
the class UnassignedTextTestSerializer method serializeUnassignedValueByRuleCall.
@Override
protected String serializeUnassignedValueByRuleCall(RuleCall ruleCall, EObject current, INode node) {
UnassignedTextTestLanguageGrammarAccess g = (UnassignedTextTestLanguageGrammarAccess) grammar;
if (ruleCall == g.getCaseInsensitiveKeywordRuleAccess().getCaseInsensitiveKeywordTerminalRuleCall_0())
return "KeyWord";
if (ruleCall == g.getPluralRuleAccess().getPluralTerminalRuleCall_2()) {
PluralRule pr = (PluralRule) current;
return pr.getCount() == 1 ? "item" : "items";
}
MultiRuleElements e = g.getMultiRuleAccess();
if (ruleCall == e.getMultiTerminalRuleCall_2())
return "accegj01";
if (ruleCall == e.getMultiTerminalRuleCall_3())
return "accegj02";
if (ruleCall == e.getMultiTerminalRuleCall_4())
return "accegj03";
if (ruleCall == g.getDatatypeRuleAccess().getDatatypeParserRuleCall_2())
return "str";
CommonTerminalsRuleElements c = g.getCommonTerminalsRuleAccess();
if (ruleCall == c.getIDTerminalRuleCall_1())
return "abc";
if (ruleCall == c.getINTTerminalRuleCall_2())
return "123";
if (ruleCall == c.getSTRINGTerminalRuleCall_3())
return "'abc'";
return null;
}
Aggregations