Exemple #1
0
        public override CodeQueryVisitor VisitConstantString(CodeQueryParser.ConstantStringContext context)
        {
            var stringValue = context.STRING().GetText().Trim('"');

            _constants.Push(stringValue);
            return(base.VisitConstantString(context));
        }
Exemple #2
0
        /// <summary>
        /// Visit a parse tree produced by <see cref="CodeQueryParser.ConstantString" />.
        /// <para>
        /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)" />
        /// on <paramref name="context" />.
        /// </para>
        /// </summary>
        public override Object VisitConstantString(CodeQueryParser.ConstantStringContext context)
        {
            var value = context.STRING().GetText().Trim('"');

            return(TreeFactory.CreateString(value));
        }