public override Yarn.IType VisitExpParens(YarnSpinnerParser.ExpParensContext context) { // Parens expressions have the type of their inner expression Yarn.IType type = Visit(context.expression()); context.Type = type; return(type); }
// the calls for the various operations and expressions // first the special cases (), unary -, !, and if it is just a value by itself #region specialCaseCalls // (expression) public override int VisitExpParens(YarnSpinnerParser.ExpParensContext context) { return(Visit(context.expression())); }
/// <summary> /// Visit a parse tree produced by the <c>expParens</c> /// labeled alternative in <see cref="YarnSpinnerParser.expression"/>. /// <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 VisitExpParens([NotNull] YarnSpinnerParser.ExpParensContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by the <c>expParens</c> /// labeled alternative in <see cref="YarnSpinnerParser.expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitExpParens([NotNull] YarnSpinnerParser.ExpParensContext context) { }