/// <summary> /// Visit a parse tree produced by <see cref="CodeQueryParser.PseudoSelectorWithIdentifier" />. /// <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> /// <returns></returns> /// <return>The visitor result.</return> public override Object VisitPseudoSelectorWithIdentifier(CodeQueryParser.PseudoSelectorWithIdentifierContext context) { var name = context.Name.Text; var values = Enumerable.Empty <ConstantElement>(); if (context.ID() != null) { values = context.ID().Select(id => TreeFactory.CreateString(id.GetText())); } return(SelectorFactory.CreateModifier(name, values)); }
/// <summary> /// Visit a parse tree produced by <see cref="CodeQueryParser.PseudoSelectorWithIdentifier"/>. /// <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 VisitPseudoSelectorWithIdentifier([NotNull] CodeQueryParser.PseudoSelectorWithIdentifierContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="CodeQueryParser.PseudoSelectorWithIdentifier"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitPseudoSelectorWithIdentifier([NotNull] CodeQueryParser.PseudoSelectorWithIdentifierContext context) { }