本文整理汇总了C#中CodeElementsParser.identifier方法的典型用法代码示例。如果您正苦于以下问题:C# CodeElementsParser.identifier方法的具体用法?C# CodeElementsParser.identifier怎么用?C# CodeElementsParser.identifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeElementsParser
的用法示例。
在下文中一共展示了CodeElementsParser.identifier方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateAlphanumericVariable
internal AlphanumericVariable CreateAlphanumericVariable(CodeElementsParser.AlphanumericVariable1Context context)
{
if (context.identifier() != null)
{
return new AlphanumericVariable(
CreateIdentifier(context.identifier()));
}
else
{
return new AlphanumericVariable(
CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue3()));
}
}
示例2: CreateNumericStorageArea
// --- Storage areas where statements results are saved ---
internal ReceivingStorageArea CreateNumericStorageArea(CodeElementsParser.NumericStorageAreaContext context)
{
return new ReceivingStorageArea(StorageDataType.Numeric,
CreateIdentifier(context.identifier()));
}
示例3: CreateMethodNameVariable
internal SymbolReferenceVariable CreateMethodNameVariable(CodeElementsParser.MethodNameVariableContext context)
{
if (context.methodNameReference() != null)
{
SymbolReference symbolReference = CobolWordsBuilder.CreateMethodNameReference(context.methodNameReference());
return new SymbolReferenceVariable(StorageDataType.MethodName, symbolReference);
}
else
{
StorageArea storageArea = CreateIdentifier(context.identifier());
return new SymbolReferenceVariable(StorageDataType.MethodName, storageArea);
}
}
示例4: CreateSharedStorageArea
internal StorageArea CreateSharedStorageArea(CodeElementsParser.SharedStorageArea1Context context)
{
if (context == null || context.identifier() == null) return null;
var identifier = CreateIdentifier(context.identifier());
return identifier;
}
示例5: CreateClassCondition
internal ConditionalExpression CreateClassCondition(CodeElementsParser.ClassConditionContext context)
{
SyntaxProperty<bool> invertResult = null;
if (context.NOT() != null)
{
invertResult = new SyntaxProperty<bool>(
true,
ParseTreeUtils.GetFirstToken(context.NOT()));
}
ClassCondition classCondition = null;
if(context.characterClassNameReference() != null)
{
classCondition = new ClassCondition(
CreateIdentifier(context.identifier()),
CobolWordsBuilder.CreateCharacterClassNameReference(context.characterClassNameReference()),
invertResult);
}
else
{
DataItemContentType contentTypeEnum = DataItemContentType.Numeric;
if(context.dataItemContentType().ALPHABETIC() != null)
{
contentTypeEnum = DataItemContentType.Alphabetic;
}
else if (context.dataItemContentType().ALPHABETIC_LOWER() != null)
{
contentTypeEnum = DataItemContentType.AlphabeticLower;
}
else if (context.dataItemContentType().ALPHABETIC_UPPER() != null)
{
contentTypeEnum = DataItemContentType.AlphabeticUpper;
}
else if (context.dataItemContentType().DBCS() != null)
{
contentTypeEnum = DataItemContentType.DBCS;
}
else if (context.dataItemContentType().KANJI() != null)
{
contentTypeEnum = DataItemContentType.Kanji;
}
SyntaxProperty<DataItemContentType> dataItemContentType = new SyntaxProperty<DataItemContentType>(
contentTypeEnum,
ParseTreeUtils.GetFirstToken(context.dataItemContentType()));
classCondition = new ClassCondition(
CreateIdentifier(context.identifier()),
dataItemContentType,
invertResult);
}
return classCondition;
}
示例6: CreateProgramNameOrProgramEntryOrProcedurePointerOrFunctionPointerVariable
internal SymbolReferenceVariable CreateProgramNameOrProgramEntryOrProcedurePointerOrFunctionPointerVariable(CodeElementsParser.ProgramNameOrProgramEntryOrProcedurePointerOrFunctionPointerVariableContext context)
{
if (context.programNameReferenceOrProgramEntryReference() != null)
{
SymbolReference symbolReference = CobolWordsBuilder.CreateProgramNameReferenceOrProgramEntryReference(context.programNameReferenceOrProgramEntryReference());
return new SymbolReferenceVariable(StorageDataType.ProgramNameOrProgramEntryOrProcedurePointerOrFunctionPointer, symbolReference);
}
else
{
StorageArea storageArea = CreateIdentifier(context.identifier());
return new SymbolReferenceVariable(StorageDataType.ProgramNameOrProgramEntryOrProcedurePointerOrFunctionPointer, storageArea);
}
}
示例7: CreateVariable
internal Variable CreateVariable(CodeElementsParser.Variable1Context context)
{
if (context == null) return null;
StorageArea storageArea = CreateIdentifier(context.identifier());
return new Variable(storageArea);
}
示例8: CreateNumericVariable
internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable3Context context)
{
NumericVariable variable = null;
if (context.identifier() != null)
variable = new NumericVariable(CreateIdentifier(context.identifier()));
if (context.numericValue() != null)
variable = new NumericVariable(CobolWordsBuilder.CreateNumericValue(context.numericValue()));
// Collect storage area read/writes at the code element level
if (variable != null && variable.StorageArea != null)
{
this.storageAreaReads.Add(variable.StorageArea);
}
return variable;
}
示例9: CreateAlphanumericStorageArea
internal ReceivingStorageArea CreateAlphanumericStorageArea(CodeElementsParser.AlphanumericStorageAreaContext context)
{
var storageArea = new ReceivingStorageArea(StorageDataType.Alphanumeric,
CreateIdentifier(context.identifier()));
// Collect storage area read/writes at the code element level
this.storageAreaWrites.Add(storageArea);
return storageArea;
}
示例10: CreateVariableOrExpression
internal VariableOrExpression CreateVariableOrExpression(CodeElementsParser.VariableOrExpression2Context context)
{
VariableOrExpression variableOrExpression = null;
if (context.identifier() != null)
{
variableOrExpression = new VariableOrExpression(
CreateIdentifier(context.identifier()));
}
else if (context.numericValue() != null)
{
variableOrExpression = new VariableOrExpression(
CobolWordsBuilder.CreateNumericValue(context.numericValue()));
}
else if (context.alphanumericValue2() != null)
{
variableOrExpression = new VariableOrExpression(
CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue2()));
}
else if (context.repeatedCharacterValue1() != null)
{
variableOrExpression = new VariableOrExpression(
CobolWordsBuilder.CreateRepeatedCharacterValue(context.repeatedCharacterValue1()));
}
else
{
variableOrExpression = new VariableOrExpression(
CreateArithmeticExpression(context.arithmeticExpression()));
}
// Collect storage area read/writes at the code element level
if (variableOrExpression.StorageArea != null)
{
this.storageAreaReads.Add(variableOrExpression.StorageArea);
}
return variableOrExpression;
}
示例11: CreateVariable
internal Variable CreateVariable(CodeElementsParser.Variable7Context context)
{
if (context == null) return null;
Variable variable = null;
if (context.identifier() != null) {
variable = new Variable(CreateIdentifier(context.identifier()));
} else
if (context.numericValue() != null) {
variable = new Variable(CobolWordsBuilder.CreateNumericValue(context.numericValue()));
} else
if (context.alphanumericValue2() != null) {
variable = new Variable(CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue2()));
} else {
variable = new Variable(CobolWordsBuilder.CreateRepeatedCharacterValue(context.repeatedCharacterValue2()));
}
// Collect storage area read/writes at the code element level
if (variable.StorageArea != null)
{
this.storageAreaReads.Add(variable.StorageArea);
}
return variable;
}
示例12: CreateSharedVariable
// --- Storage areas shared with calling or called program ---
internal Variable CreateSharedVariable(CodeElementsParser.SharedVariable3Context context)
{
Variable variable = null;
if (context.identifier() != null) {
StorageArea storageArea = CreateIdentifier(context.identifier());
variable = new Variable(storageArea);
} else
if (context.numericValue() != null) {
variable = new Variable(CobolWordsBuilder.CreateNumericValue(context.numericValue()));
} else {
variable = new Variable(CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue2()));
}
// Collect storage area read/writes at the code element level
if (variable.StorageArea != null) {
this.storageAreaReads.Add(variable.StorageArea);
}
return variable;
}
示例13: CreateNumericVariable
internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable1Context context)
{
return new NumericVariable(
CreateIdentifier(context.identifier()));
}
示例14: CreateProgramNameVariable
internal SymbolReferenceVariable CreateProgramNameVariable(CodeElementsParser.ProgramNameVariableContext context)
{
SymbolReferenceVariable variable = null;
if (context.programNameReference1() != null) {
SymbolReference symbolReference = CobolWordsBuilder.CreateProgramNameReference(context.programNameReference1());
variable = new SymbolReferenceVariable(StorageDataType.ProgramName, symbolReference);
}
if (context.identifier() != null) {
StorageArea storageArea = CreateIdentifier(context.identifier());
variable = new SymbolReferenceVariable(StorageDataType.ProgramName, storageArea);
}
// Collect storage area read/writes at the code element level
if (variable!= null && variable.StorageArea != null)
{
this.storageAreaReads.Add(variable.StorageArea);
}
return variable;
}
示例15: CreateProgramNameVariable
internal SymbolReferenceVariable CreateProgramNameVariable(CodeElementsParser.ProgramNameVariableContext context)
{
if (context.programNameReference1() != null) {
SymbolReference symbolReference = CobolWordsBuilder.CreateProgramNameReference(context.programNameReference1());
return new SymbolReferenceVariable(StorageDataType.ProgramName, symbolReference);
}
if (context.identifier() != null) {
StorageArea storageArea = CreateIdentifier(context.identifier());
return new SymbolReferenceVariable(StorageDataType.ProgramName, storageArea);
}
return null;
}