예제 #1
0
        protected internal override void parse_upvalues(ByteBuffer buffer, BHeader header, LFunctionParseState s)
        {
            BList <LUpvalue> upvalues = header.upvalue.parseList(buffer, header);

            s.lenUpvalues = upvalues.length.asInt();
            s.upvalues    = upvalues.asArray(new LUpvalue[s.lenUpvalues]);
        }
예제 #2
0
        protected internal virtual void parse_debug(ByteBuffer buffer, BHeader header, LFunctionParseState s)
        {
            if (header.debug)
            {
                Console.WriteLine("-- beginning to parse source lines list");
            }
            s.lines = header.integer.parseList(buffer, header);
            if (header.debug)
            {
                Console.WriteLine("-- beginning to parse locals list");
            }
            s.locals = header.local.parseList(buffer, header);
            if (header.debug)
            {
                Console.WriteLine("-- beginning to parse upvalues list");
            }
            BList <LString> upvalueNames = [email protected](buffer, header);

            for (int i = 0; i < upvalueNames.length.asInt(); i++)
            {
                s.upvalues[i].name = upvalueNames.get(i).deref();
            }
        }