示例#1
0
 /// <summary>
 /// When match a word range context adds a <see cref="StepWordRange"/>.
 /// </summary>
 /// <param name="context">The context<see cref="UserAgentTreeWalkerParser.MatcherWordRangeContext"/>.</param>
 /// <returns>null.</returns>
 public override object VisitMatcherWordRange([NotNull] UserAgentTreeWalkerParser.MatcherWordRangeContext context)
 {
     this.Visit(context.matcher());
     this.FromHereItCannotBeInHashMapAnymore();
     this.Add(new StepWordRange(WordRangeVisitor.GetRange(context.wordRange())));
     return(null); // Void
 }
示例#2
0
            /// <summary>
            /// When visit a word range step adds a <see cref="StepWordRange"/>.
            /// </summary>
            /// <param name="context">The context<see cref="UserAgentTreeWalkerParser.StepWordRangeContext"/>.</param>
            /// <returns>The <see cref="object"/>.</returns>
            public override object VisitStepWordRange([NotNull] UserAgentTreeWalkerParser.StepWordRangeContext context)
            {
                var range = WordRangeVisitor.GetRange(context.wordRange());

                this.Add(new StepWordRange(range));
                this.VisitNext(context.nextStep);
                return(null); // Void
            }