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


C# CodeElementsParser.identifier方法代码示例

本文整理汇总了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()));
     }
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:13,代码来源:CobolExpressionsBuilder.cs

示例2: CreateNumericStorageArea

 // --- Storage areas where statements results are saved ---
 internal ReceivingStorageArea CreateNumericStorageArea(CodeElementsParser.NumericStorageAreaContext context)
 {
     return new ReceivingStorageArea(StorageDataType.Numeric,
         CreateIdentifier(context.identifier()));
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:6,代码来源:CobolExpressionsBuilder.cs

示例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);
     }
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:13,代码来源:CobolExpressionsBuilder.cs

示例4: CreateSharedStorageArea

 internal StorageArea CreateSharedStorageArea(CodeElementsParser.SharedStorageArea1Context context)
 {
     if (context == null || context.identifier() == null) return null;
     var identifier = CreateIdentifier(context.identifier());
     return identifier;
 }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:6,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:53,代码来源:CobolExpressionsBuilder.cs

示例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);
     }
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:13,代码来源:CobolExpressionsBuilder.cs

示例7: CreateVariable

 internal Variable CreateVariable(CodeElementsParser.Variable1Context context)
 {
     if (context == null) return null;
     StorageArea storageArea = CreateIdentifier(context.identifier());
     return new Variable(storageArea);
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:6,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:16,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:10,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:37,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:24,代码来源:CobolExpressionsBuilder.cs

示例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;
 }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:19,代码来源:CobolExpressionsBuilder.cs

示例13: CreateNumericVariable

 internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable1Context context)
 {
     return new NumericVariable(
         CreateIdentifier(context.identifier()));
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:5,代码来源:CobolExpressionsBuilder.cs

示例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;
        }
开发者ID:osmedile,项目名称:TypeCobol,代码行数:20,代码来源:CobolExpressionsBuilder.cs

示例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;
 }
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:12,代码来源:CobolExpressionsBuilder.cs


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