예제 #1
0
        public override Yarn.Type VisitExpMultDivMod(YarnSpinnerParser.ExpMultDivModContext context)
        {
            var expressions = context.expression();

            // *, /, % all support numbers only
            return(CheckOperation(context, expressions, context.op.Text, Yarn.Type.Number));
        }
예제 #2
0
        public override Yarn.IType VisitExpMultDivMod(YarnSpinnerParser.ExpMultDivModContext context)
        {
            var expressions = context.expression();

            var @operator = CodeGenerationVisitor.TokensToOperators[context.op.Type];

            // *, /, % all support numbers only
            Yarn.IType type = CheckOperation(context, expressions, @operator, context.op.Text);
            context.Type = type;
            return(type);
        }
예제 #3
0
        // * / %
        public override int VisitExpMultDivMod(YarnSpinnerParser.ExpMultDivModContext context)
        {
            genericExpVisitor(context.expression(0), context.expression(1), context.op.Type);

            return(0);
        }
예제 #4
0
        // * / %
        public override int VisitExpMultDivMod(YarnSpinnerParser.ExpMultDivModContext context)
        {
            this.GenerateCodeForOperation(TokensToOperators[context.op.Type], context.op, context.Type, context.expression(0), context.expression(1));

            return(0);
        }