AddConstant() private method

private AddConstant ( Wren.Core.Objects.Obj constant ) : int
constant Wren.Core.Objects.Obj
return int
コード例 #1
0
ファイル: Compiler.cs プロジェクト: robotii/Wren.NET
        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);
        }