AddConstant() private method

private AddConstant ( Wren.Core.Objects.Obj constant ) : int
constant Wren.Core.Objects.Obj
return int
Beispiel #1
0
        private static void Number(Compiler c, bool allowAssignment)
        {
            int constant = c.AddConstant(new Obj(c._parser.Number));

            // Compile the code to load the constant.
            c.EmitShortArg(Instruction.CONSTANT, constant);
        }