/// <summary> /// When match a path lookup context adds a <see cref="StepLookup"/>. /// </summary> /// <param name="context">The context<see cref="UserAgentTreeWalkerParser.MatcherPathLookupContext"/>.</param> /// <returns>null.</returns> public override object VisitMatcherPathLookup([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContext context) { this.Visit(context.matcher()); this.FromHereItCannotBeInHashMapAnymore(); var lookupName = context.lookup.Text; var lookup = this.GetLookup(lookupName); this.Add(new StepLookup(lookupName, lookup, this.ExtractText(context.defaultValue))); return(null); // Void }
/// <summary> /// When match a path lookup visit the lookups. /// </summary> /// <param name="context">The context<see cref="UserAgentTreeWalkerParser.MatcherPathLookupContext"/>.</param> /// <returns>The <see cref="string"/>.</returns> public override string VisitMatcherPathLookup([NotNull] UserAgentTreeWalkerParser.MatcherPathLookupContext context) { return(this.VisitLookups(context.matcher(), context.lookup, context.defaultValue)); }