Exemplo n.º 1
0
            /// <summary>
            /// When match a path lookup contains context adds a <see cref="StepLookupContains"/>.
            /// </summary>
            /// <param name="context">The context<see cref="UserAgentTreeWalkerParser.MatcherPathLookupContainsContext"/>.</param>
            /// <returns>null.</returns>
            public override object VisitMatcherPathLookupContains([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContainsContext context)
            {
                this.Visit(context.matcher());

                this.FromHereItCannotBeInHashMapAnymore();

                var lookupName = context.lookup.Text;
                var lookup     = this.GetLookup(lookupName);

                this.Add(new StepLookupContains(lookupName, lookup, this.ExtractText(context.defaultValue)));
                return(null); // Void
            }
	/// <summary>
	/// Exit a parse tree produced by the <c>matcherPathLookupContains</c>
	/// labeled alternative in <see cref="UserAgentTreeWalkerParser.matcher"/>.
	/// <para>The default implementation does nothing.</para>
	/// </summary>
	/// <param name="context">The parse tree.</param>
	public virtual void ExitMatcherPathLookupContains([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContainsContext context) { }
Exemplo n.º 3
0
 /// <summary>
 /// Removes quotes from default value when visiting a MatcherPathLookupContains.
 /// </summary>
 /// <param name="ctx">The context.</param>
 /// <returns>null.</returns>
 public override object VisitMatcherPathLookupContains([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContainsContext ctx)
 {
     this.UnQuoteToken(ctx.defaultValue);
     return(base.VisitMatcherPathLookupContains(ctx));
 }
 /// <summary>
 /// Visit a parse tree produced by the <c>matcherPathLookupContains</c>
 /// labeled alternative in <see cref="UserAgentTreeWalkerParser.matcher"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitMatcherPathLookupContains([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContainsContext context)
 {
     return(VisitChildren(context));
 }