Examples of arg1()


Examples of org.luaj.vm2.Varargs.arg1()

      case 1: // "dofile", // ( filename ) -> result1, ...
      {
        Varargs v = args.isnil(1)?
            BaseLib.loadStream( baselib.STDIN, "=stdin" ):
            BaseLib.loadFile( args.checkjstring(1) );
        return v.isnil(1)? error(v.tojstring(2)): v.arg1().invoke();
      }
      case 2: // "getfenv", // ( [f] ) -> env
      {
        LuaValue f = getfenvobj(args.arg1());
          LuaValue e = f.getfenv();
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

        filename = template.substring(0,q) + name + template.substring(q+1);
      }
     
      // try loading the file
      Varargs v = BaseLib.loadFile(filename);
      if ( v.arg1().isfunction() )
        return v.arg1();
     
      // report error
      if ( sb == null )
        sb = new StringBuffer();
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

      }
     
      // try loading the file
      Varargs v = BaseLib.loadFile(filename);
      if ( v.arg1().isfunction() )
        return v.arg1();
     
      // report error
      if ( sb == null )
        sb = new StringBuffer();
      sb.append( "\n\t'"+filename+"': "+v.arg(2) );
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

        return cl;
      }
      case WRAPPED: {
        final LuaThread t = (LuaThread) env;
        final Varargs result = t.resume( args );
        if ( result.arg1().toboolean() ) {
          return result.subargs(2);
        } else {
          error( result.arg(2).tojstring() );
        }
      }
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

        LuaValue k = LuaValue.NIL;
       
        while (true) {
           Varargs n = table.next(k);
          
           if ((k = n.arg1()).isnil())
             break;

           LuaValue v = n.arg(2);
           list.append(v);
         }
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

        LuaValue k = LuaValue.NIL;
       
        while (true) {
           Varargs n = table.next(k);
          
           if ((k = n.arg1()).isnil())
             break;

           LuaValue v = n.arg(2);
           map.put(k, v);
         }
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

    if(object instanceof CCCommandWrapper) {
      LuaTable lpTable = new LPLuaTable((CCCommandWrapper)object);
      LuaValue k = LuaValue.NIL;
      while(true) {
        Varargs n = table.next(k);
        if((k = n.arg1()).isnil()) break;
        LuaValue v = n.arg(2);
        lpTable.set(k, v);
      }
      ((CCCommandWrapper)object).table = lpTable;
      return lpTable;
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

    }

    public boolean isCollidable() {
        if (collideFunc != null) {
            Varargs retval = collideFunc.invoke();
            if (!retval.arg1().isboolean()) {
                return true; // make user set a default?
            }
            return retval.arg1().checkboolean();
        }
        return collidable;
View Full Code Here

Examples of org.luaj.vm2.Varargs.arg1()

        if (collideFunc != null) {
            Varargs retval = collideFunc.invoke();
            if (!retval.arg1().isboolean()) {
                return true; // make user set a default?
            }
            return retval.arg1().checkboolean();
        }
        return collidable;
    }

    public char getSymbol() {
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.