Example #1
0
        public override Symbol VisitCapture([NotNull] PageInterpreterParser.CaptureContext context)
        {
            var matchedTextType = context.textType().Accept(this).GetValue <string>();
            var propertyName    = context.propertyName()?.Accept(this).GetValue <string>();
            var capturedValue   = pageTraverser.GetMatchingPageUnit(matchedTextType)?.Value;

            if (!string.IsNullOrWhiteSpace(capturedValue))
            {
                currentPatternResult.AddResult(propertyName, capturedValue);
            }

            return(new Symbol(SymbolType.Success));
        }
        public override object VisitCapture([NotNull] PageInterpreterParser.CaptureContext context)
        {
            currentCount += 1;

            return(base.VisitCapture(context));
        }