Examples of LuaString


Examples of org.luaj.vm2.LuaString

      }
    }
  }

  LuaString str_checkname() {
    LuaString ts;
    check(TK_NAME);
    ts = t.seminfo.ts;
    next();
    return ts;
  }
View Full Code Here

Examples of org.luaj.vm2.LuaString

//
//  #define new_localvarliteral(ls,v,n) \
//    this.new_localvar(luaX_newstring(ls, "" v, (sizeof(v)/sizeof(char))-1), n)
//
  void new_localvarliteral(String v, int n) {
    LuaString ts = newstring(v);
    new_localvar(ts, n);
  }
View Full Code Here

Examples of org.luaj.vm2.LuaString

    while (fs.nactvar > tolevel)
      fs.getlocvar(--fs.nactvar).endpc = fs.pc;
  }
 
  void singlevar(expdesc var) {
    LuaString varname = this.str_checkname();
    FuncState fs = this.fs;
    if (fs.singlevaraux(varname, var, 1) == VGLOBAL)
      var.u.s.info = fs.stringK(varname); /* info points to global name */
  }
 
View Full Code Here

Examples of org.luaj.vm2.LuaString


  void forstat(int line) {
    /* forstat -> FOR (fornum | forlist) END */
    FuncState fs = this.fs;
    LuaString varname;
    BlockCnt bl = new BlockCnt();
    fs.enterblock(bl, true); /* scope for loop and control variables */
    this.next(); /* skip `for' */
    varname = this.str_checkname(); /* first variable name */
    switch (this.t.token) {
View Full Code Here

Examples of org.luaj.vm2.LuaString

            info.set(SHORT_SRC, valueOf(sourceshort(p)));
            info.set(LINEDEFINED, valueOf(p.linedefined));
            info.set(LASTLINEDEFINED, valueOf(p.lastlinedefined));
          } else {
            String shortName = di.func.tojstring();
            LuaString name = LuaString.valueOf("[Java] "+shortName);
            info.set(WHAT, JAVA);
            info.set(SOURCE, name);
            info.set(SHORT_SRC, valueOf(shortName));
            info.set(LINEDEFINED, LuaValue.MINUSONE);
            info.set(LASTLINEDEFINED, LuaValue.MINUSONE);
View Full Code Here

Examples of org.luaj.vm2.LuaString

    int level = args.checkint(a++);
    int local = args.checkint(a++);
   
    DebugState ds = getDebugState(thread);
    DebugInfo di = ds.getDebugInfo(level-1);
    LuaString name = (di!=null? di.getlocalname(local): null);
    if ( name != null ) {
      LuaValue value = di.stack[local-1];
      return varargsOf( name, value );
    } else {
      return NIL;
View Full Code Here

Examples of org.luaj.vm2.LuaString

    int local = args.checkint(a++);
    LuaValue value = args.arg(a++);
   
    DebugState ds = getDebugState(thread);
    DebugInfo di = ds.getDebugInfo(level-1);
    LuaString name = (di!=null? di.getlocalname(local): null);
    if ( name != null ) {
      di.stack[local-1] = value;
      return name;
    } else {
      return NIL;
View Full Code Here

Examples of org.luaj.vm2.LuaString

  static Varargs _getupvalue(Varargs args) {
    LuaValue func = args.checkfunction(1);
    int up = args.checkint(2);
    if ( func instanceof LuaClosure ) {
      LuaClosure c = (LuaClosure) func;
      LuaString name = findupvalue(c, up);
      if ( name != null ) {
        return varargsOf(name, c.upValues[up-1].getValue() );
      }
    }
    return NIL;
View Full Code Here

Examples of org.luaj.vm2.LuaString

    LuaValue func = args.checkfunction(1);
    int up = args.checkint(2);
    LuaValue value = args.arg(3);
    if ( func instanceof LuaClosure ) {
      LuaClosure c = (LuaClosure) func;
      LuaString name = findupvalue(c, up);
      if ( name != null ) {
        c.upValues[up-1].setValue(value);
        return name;
      }
    }
View Full Code Here

Examples of org.luaj.vm2.LuaString

 

 
  // return StrValue[] { name, namewhat } if found, null if not
  static LuaString[] getobjname(DebugInfo di, int stackpos) {
    LuaString name;
    if (di.closure != null) { /* a Lua function? */
      Prototype p = di.closure.p;
      int pc = di.pc; // currentpc(L, ci);
      int i;// Instruction i;
      name = p.getlocalname(stackpos + 1, pc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.