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


C# VBAParser.GetText方法代码示例

本文整理汇总了C#中VBAParser.GetText方法的典型用法代码示例。如果您正苦于以下问题:C# VBAParser.GetText方法的具体用法?C# VBAParser.GetText怎么用?C# VBAParser.GetText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VBAParser的用法示例。


在下文中一共展示了VBAParser.GetText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetProcedureAccessibility

        /// <summary>
        /// Gets the <c>Accessibility</c> for a procedure member.
        /// </summary>
        private Accessibility GetProcedureAccessibility(VBAParser.VisibilityContext visibilityContext)
        {
            var visibility = visibilityContext == null
                ? "Implicit" // "Public"
                : visibilityContext.GetText();

            return (Accessibility)Enum.Parse(typeof(Accessibility), visibility);
        }
开发者ID:ThunderFrame,项目名称:Rubberduck,代码行数:11,代码来源:DeclarationSymbolsListener.cs

示例2: DeclareExplicitVariant

        private string DeclareExplicitVariant(VBAParser.ArgContext context, out string instruction)
        {
            if (context == null)
            {
                instruction = null;
                return null;
            }

            instruction = context.GetText();
            return instruction + ' ' + Tokens.As + ' ' + Tokens.Variant;
        }
开发者ID:ThunderFrame,项目名称:Rubberduck,代码行数:11,代码来源:VariableTypeNotDeclaredInspectionResult.cs

示例3: ProcedureNode

        private ProcedureNode(ParserRuleContext context, string scope, string localScope,
                              VBProcedureKind kind,
                              VBAParser.VisibilityContext visibility,
                              VBAParser.AmbiguousIdentifierContext name,
                              Func<VBAParser.AsTypeClauseContext> asType)
            : base(context, scope, localScope)
        {
            _kind = kind;
            _name = name.GetText();
            _accessibility = visibility.GetAccessibility();
            _visibilityContext = visibility;

            if (asType != null)
            {
                var returnTypeClause = asType();
                _isImplicitReturnType = returnTypeClause == null;

                _returnType = returnTypeClause == null
                                ? Tokens.Variant
                                : returnTypeClause.type().GetText();
            }
        }
开发者ID:retailcoder,项目名称:Rubberduck,代码行数:22,代码来源:ProcedureNode.cs

示例4: EnterAmbiguousIdentifier

            public override void EnterAmbiguousIdentifier(VBAParser.AmbiguousIdentifierContext context)
            {
                DeclarationType type;
                if (!ScopingContextTypes.TryGetValue(context.Parent.GetType(), out type))
                {
                    return;
                }

                _currentScope = Tuple.Create(context.GetText(), type);
            }
开发者ID:retailcoder,项目名称:Rubberduck,代码行数:10,代码来源:AttributeParser.cs

示例5: ExitOptionPrivateModuleStmt

 public override void ExitOptionPrivateModuleStmt(VBAParser.OptionPrivateModuleStmtContext context)
 {
     OnNewDeclaration(CreateDeclaration(context.GetText(), string.Empty, Accessibility.Implicit, DeclarationType.ModuleOption, context, context.GetSelection()));
 }
开发者ID:retailcoder,项目名称:Rubberduck,代码行数:4,代码来源:DeclarationSymbolsListener.cs

示例6: GetMemberAccessibility

        /// <summary>
        /// Gets the <c>Accessibility</c> for a non-procedure member.
        /// </summary>
        private Accessibility GetMemberAccessibility(VBAParser.VisibilityContext visibilityContext)
        {
            var visibility = visibilityContext == null
                ? "Implicit" // "Private"
                : visibilityContext.GetText();

            return (Accessibility)Enum.Parse(typeof(Accessibility), visibility, true);
        }
开发者ID:retailcoder,项目名称:Rubberduck,代码行数:11,代码来源:DeclarationSymbolsListener.cs

示例7: EnterOptionExplicitStmt

 public override void EnterOptionExplicitStmt(VBAParser.OptionExplicitStmtContext context)
 {
     _declarations.Add(CreateDeclaration(context.GetText(), string.Empty, Accessibility.Implicit, DeclarationType.ModuleOption, context, context.GetSelection()));
 }
开发者ID:ThunderFrame,项目名称:Rubberduck,代码行数:4,代码来源:DeclarationSymbolsListener.cs


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