public override object VisitConstSymmetry([NotNull] ChessVCParser.ConstSymmetryContext context) { if (context.GetText() == "MirrorSymmetry") { return(new MirrorSymmetry()); } else if (context.GetText() == "RotationalSymmetry") { return(new RotationalSymmetry()); } else if (context.GetText() == "NoSymmetry") { return(new NoSymmetry()); } return(null); }
public override object VisitConstSymmetry([NotNull] ChessVCParser.ConstSymmetryContext context) { string txt = context.GetText(); if (txt == "MirrorSymmetry") { return(new MirrorSymmetry()); } else if (txt == "RotationalSymmetry") { return(new RotationalSymmetry()); } else if (txt == "NoSymmetry") { return(new NoSymmetry()); } throw new Exception("!"); }
/// <summary> /// Visit a parse tree produced by the <c>ConstSymmetry</c> /// labeled alternative in <see cref="ChessVCParser.literal"/>. /// <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 VisitConstSymmetry([NotNull] ChessVCParser.ConstSymmetryContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by the <c>ConstSymmetry</c> /// labeled alternative in <see cref="ChessVCParser.literal"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitConstSymmetry([NotNull] ChessVCParser.ConstSymmetryContext context) { }