本文整理汇总了Java中org.eclipse.xtext.TerminalRule类的典型用法代码示例。如果您正苦于以下问题:Java TerminalRule类的具体用法?Java TerminalRule怎么用?Java TerminalRule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TerminalRule类属于org.eclipse.xtext包,在下文中一共展示了TerminalRule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDocumentation
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
private String getDocumentation(/* @NonNull */EObject object) {
if (object.eContainer() == null) {
// if a comment is at the beginning of the file it will be returned for
// the root element (e.g. Script in N4JS) as well -> avoid this!
return null;
}
ICompositeNode node = NodeModelUtils.getNode(object);
if (node != null) {
// get the last multi line comment before a non hidden leaf node
for (ILeafNode leafNode : node.getLeafNodes()) {
if (!leafNode.isHidden())
break;
EObject grammarElem = leafNode.getGrammarElement();
if (grammarElem instanceof TerminalRule
&& "ML_COMMENT".equalsIgnoreCase(((TerminalRule) grammarElem).getName())) {
String comment = leafNode.getText();
if (commentStartTagRegex.matcher(comment).matches()) {
return leafNode.getText();
}
}
}
}
return null;
}
示例2: getSL_COMMENT_FRAGMENTRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENT_FRAGMENTRule() {
return gaUnicode.getSL_COMMENT_FRAGMENTRule();
}
示例3: processElement
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
@Override
protected void processElement(AbstractElement element, AbstractRule rule, Builder<String> result) {
if (element instanceof RuleCall) {
AbstractRule calledRule = ((RuleCall) element).getRule();
if (calledRule instanceof TerminalRule) {
super.processElement(element, rule, result);
} else {
processElement(calledRule.getAlternatives(), rule, result);
}
} else {
super.processElement(element, rule, result);
}
}
示例4: getSL_COMMENTRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENTRule() {
return gaTerminals.getSL_COMMENTRule();
}
示例5: getBOOLEANRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getBOOLEANRule() {
return tBOOLEAN;
}
示例6: getML_COMMENTRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getML_COMMENTRule() {
return gaTerminals.getML_COMMENTRule();
}
示例7: getBOMRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getBOMRule() {
return gaUnicode.getBOMRule();
}
示例8: getWSRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getWSRule() {
return gaTerminals.getWSRule();
}
示例9: getLEGACY_OCTAL_INTRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getLEGACY_OCTAL_INTRule() {
return tLEGACY_OCTAL_INT;
}
示例10: TypesGrammarAccess
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
@Inject
public TypesGrammarAccess(GrammarProvider grammarProvider,
TypeExpressionsGrammarAccess gaTypeExpressions,
UnicodeGrammarAccess gaUnicode) {
this.grammar = internalFindGrammar(grammarProvider);
this.gaTypeExpressions = gaTypeExpressions;
this.gaUnicode = gaUnicode;
this.pTypeDefs = new TypeDefsElements();
this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.n4js.ts.Types.STRING");
this.tSINGLE_STRING_CHAR = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.n4js.ts.Types.SINGLE_STRING_CHAR");
this.pTAnnotation = new TAnnotationElements();
this.pTAnnotationArgument = new TAnnotationArgumentElements();
this.pTAnnotationStringArgument = new TAnnotationStringArgumentElements();
this.pTAnnotationTypeRefArgument = new TAnnotationTypeRefArgumentElements();
this.eTypeAccessModifier = new TypeAccessModifierElements();
this.eMemberAccessModifier = new MemberAccessModifierElements();
this.pType = new TypeElements();
this.pTypeRef = new TypeRefElements();
this.pPrimitiveType = new PrimitiveTypeElements();
this.pTypeReferenceName = new TypeReferenceNameElements();
this.pAnyType = new AnyTypeElements();
this.pVoidType = new VoidTypeElements();
this.pUndefinedType = new UndefinedTypeElements();
this.pNullType = new NullTypeElements();
this.pTypesIdentifier = new TypesIdentifierElements();
this.pBindingTypesIdentifier = new BindingTypesIdentifierElements();
this.pVoidOrBindingIdentifier = new VoidOrBindingIdentifierElements();
this.pTypesSpecificKeywords = new TypesSpecificKeywordsElements();
this.pTypesComputedPropertyName = new TypesComputedPropertyNameElements();
this.pTypesSymbolLiteralComputedName = new TypesSymbolLiteralComputedNameElements();
this.pTypesStringLiteralComputedName = new TypesStringLiteralComputedNameElements();
this.pTObjectPrototype = new TObjectPrototypeElements();
this.pVirtualBaseType = new VirtualBaseTypeElements();
this.pTClass = new TClassElements();
this.pTInterface = new TInterfaceElements();
this.pTypeVariable = new TypeVariableElements();
this.pTClassOrInterfaceHeader = new TClassOrInterfaceHeaderElements();
this.pCallableCtor = new CallableCtorElements();
this.pTFormalParameters = new TFormalParametersElements();
this.pTMember = new TMemberElements();
this.pTMethod = new TMethodElements();
this.pTField = new TFieldElements();
this.pTGetter = new TGetterElements();
this.pTSetter = new TSetterElements();
this.pTFunction = new TFunctionElements();
this.pTEnum = new TEnumElements();
this.pTEnumLiteral = new TEnumLiteralElements();
}
示例11: getSTRINGRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSTRINGRule() {
return tSTRING;
}
示例12: getSL_COMMENTRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENTRule() {
return tSL_COMMENT;
}
示例13: getSTRUCTMODSUFFIXRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSTRUCTMODSUFFIXRule() {
return gaTypeExpressions.getSTRUCTMODSUFFIXRule();
}
示例14: getIDENTIFIERRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getIDENTIFIERRule() {
return gaTypeExpressions.getIDENTIFIERRule();
}
示例15: getIDRule
import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getIDRule() {
return gaTerminals.getIDRule();
}