public override Yarn.Type VisitIf_clause(YarnSpinnerParser.If_clauseContext context) { // If clauses are required to be boolean var expressions = new[] { context.expression() }; return(CheckOperation(context, expressions, "if statement", Yarn.Type.Bool)); }
public override Yarn.IType VisitIf_clause(YarnSpinnerParser.If_clauseContext context) { VisitChildren(context); // If clauses are required to be boolean var expressions = new[] { context.expression() }; return(CheckOperation(context, expressions, Operator.None, "if statement", BuiltinTypes.Boolean)); }
/// <summary> /// Visit a parse tree produced by <see cref="YarnSpinnerParser.if_clause"/>. /// <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 VisitIf_clause([NotNull] YarnSpinnerParser.If_clauseContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="YarnSpinnerParser.if_clause"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitIf_clause([NotNull] YarnSpinnerParser.If_clauseContext context) { }