当前位置: 首页>>代码示例>>Java>>正文


Java TerminalRule类代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:28,代码来源:ASTGraphProvider.java

示例2: getSL_COMMENT_FRAGMENTRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENT_FRAGMENTRule() {
	return gaUnicode.getSL_COMMENT_FRAGMENTRule();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:TypesGrammarAccess.java

示例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);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:14,代码来源:IdentifierDelegateValueConverter.java

示例4: getSL_COMMENTRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENTRule() {
	return gaTerminals.getSL_COMMENTRule();
}
 
开发者ID:mduft,项目名称:lcdsl,代码行数:4,代码来源:LcDslGrammarAccess.java

示例5: getBOOLEANRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getBOOLEANRule() {
	return tBOOLEAN;
}
 
开发者ID:mduft,项目名称:lcdsl,代码行数:4,代码来源:LcDslGrammarAccess.java

示例6: getML_COMMENTRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getML_COMMENTRule() {
	return gaTerminals.getML_COMMENTRule();
}
 
开发者ID:hristo-vrigazov,项目名称:bromium,代码行数:4,代码来源:BromiumGrammarAccess.java

示例7: getBOMRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getBOMRule() {
	return gaUnicode.getBOMRule();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:RegularExpressionGrammarAccess.java

示例8: getWSRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getWSRule() {
	return gaTerminals.getWSRule();
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:4,代码来源:PkmntcgoGrammarAccess.java

示例9: getLEGACY_OCTAL_INTRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getLEGACY_OCTAL_INTRule() {
	return tLEGACY_OCTAL_INT;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:N4JSGrammarAccess.java

示例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();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:49,代码来源:TypesGrammarAccess.java

示例11: getSTRINGRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSTRINGRule() {
	return tSTRING;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:TypesGrammarAccess.java

示例12: getSL_COMMENTRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSL_COMMENTRule() {
	return tSL_COMMENT;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:4,代码来源:DslGrammarAccess.java

示例13: getSTRUCTMODSUFFIXRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getSTRUCTMODSUFFIXRule() {
	return gaTypeExpressions.getSTRUCTMODSUFFIXRule();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:TypesGrammarAccess.java

示例14: getIDENTIFIERRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getIDENTIFIERRule() {
	return gaTypeExpressions.getIDENTIFIERRule();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:TypesGrammarAccess.java

示例15: getIDRule

import org.eclipse.xtext.TerminalRule; //导入依赖的package包/类
public TerminalRule getIDRule() {
	return gaTerminals.getIDRule();
}
 
开发者ID:vicegd,项目名称:org.xtext.dsl.restaurante,代码行数:4,代码来源:RestauranteGrammarAccess.java


注:本文中的org.eclipse.xtext.TerminalRule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。