Пример #1
0
        // A <<jump>> command, which immediately jumps to another node, given
        // its name.
        public override int VisitJumpToNodeName([NotNull] YarnSpinnerParser.JumpToNodeNameContext context)
        {
            this.compiler.Emit(OpCode.PushString, context.destination, new Operand(context.destination.Text));
            this.compiler.Emit(OpCode.RunNode, context.Start);

            return(0);
        }
Пример #2
0
        // A <<jump>> command, which immediately jumps to another node, given
        // its name.
        public override int VisitJumpToNodeName([NotNull] YarnSpinnerParser.JumpToNodeNameContext context)
        {
            if (trackingEnabled != null)
            {
                GenerateTrackingCode(trackingEnabled);
            }
            compiler.Emit(OpCode.PushString, context.destination, new Operand(context.destination.Text));
            compiler.Emit(OpCode.RunNode, context.Start);

            return(0);
        }
Пример #3
0
 /// <summary>
 /// Exit a parse tree produced by the <c>jumpToNodeName</c>
 /// labeled alternative in <see cref="YarnSpinnerParser.jump_statement"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitJumpToNodeName([NotNull] YarnSpinnerParser.JumpToNodeNameContext context)
 {
 }
Пример #4
0
 /// <summary>
 /// Visit a parse tree produced by the <c>jumpToNodeName</c>
 /// labeled alternative in <see cref="YarnSpinnerParser.jump_statement"/>.
 /// <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 VisitJumpToNodeName([NotNull] YarnSpinnerParser.JumpToNodeNameContext context)
 {
     return(VisitChildren(context));
 }