Package org.luaj.vm2.lib

Examples of org.luaj.vm2.lib.CoroutineLib


        throw new FileNotFoundException("could not find module " + moduleName);
    }

    @Override
    public LuaValue getSetupOptions() {
        return new LuaTable();
    }
View Full Code Here


        });
    }

    private static class unpack extends VarArgFunction {
        public Varargs invoke(Varargs args) {
            LuaTable t = args.checktable(1);
            switch (args.narg()) {
                case 1: return t.unpack();
                case 2: return t.unpack(args.checkint(2));
                default: return t.unpack(args.checkint(2), args.checkint(3));
            }
        }
View Full Code Here

        return "mw.language";
    }

    @Override
    public LuaTable getInterface() {
        LuaTable table = new LuaTable();
        table.set("isSupportedLanguage", defaultFunction());
        table.set("isKnownLanguageTag", defaultFunction());
        table.set("isValidCode", defaultFunction());
        table.set("isValidBuiltInCode", defaultFunction());
        table.set("fetchLanguageName", fetchLanguageName());
        table.set("fetchLanguageNames", fetchLanguageNames());
        table.set("getFallbacksFor", defaultFunction());
        table.set("getContLangCode", getContLangCode());
        table.set("lc", lc());
        table.set("uc", uc());
        /*
        // TODO
        lcfirst
        ucfirst
        caseFold
View Full Code Here

             *                   'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
             *                   'mwfile' only if the language is in 'mw' *and* has a message file
             * @return array: language code => language name
             */
            @Override public LuaValue call(LuaValue inLanguage, LuaValue include) {
                return new LuaTable();
            }
        };
    }
View Full Code Here

        return "mw.text";
    }

    @Override
    public LuaTable getInterface() {
        LuaTable table = new LuaTable();

        table.set("unstrip", unstrip());
        table.set("getEntityTable", getEntityTable());
        return table;
    }
View Full Code Here

        };
    }

    @Override
    public LuaValue getSetupOptions() {
        LuaTable table = new LuaTable();
        table.set("nowiki_protocols", new LuaTable());
        table.set("comma", ", ");
        table.set("and", " and ");
        table.set("ellipsis", "...");
        return table;
    }
View Full Code Here

        return "mw.message";
    }

    @Override
    public LuaTable getInterface() {
        LuaTable iface = new LuaTable();
        iface.set("plain", messagePlain());
        iface.set("check", messageCheck());
        return iface;
    }
View Full Code Here

        };
    }

    @Override
    public LuaValue getSetupOptions() {
        LuaTable options = new LuaTable();

        options.set("lang", "en");
        return options;
    }
View Full Code Here

        final LuaString rawMessage;

        Message(LuaValue data) {
            useDB  = data.get("useDB").optboolean(false);
            lang   = data.get("lang").optjstring("en");
            keys   = data.get("keys").opttable(new LuaTable());
            params = data.get("params").opttable(new LuaTable());
            rawMessage = data.get("rawMessage").checkstring();
        }
View Full Code Here

        return "mw.html";
    }

    @Override
    public LuaTable getInterface() {
        LuaTable iface = new LuaTable();
        return iface;

    }
View Full Code Here

TOP

Related Classes of org.luaj.vm2.lib.CoroutineLib

Copyright © 2018 www.massapicom. 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.