Esempio n. 1
0
 public boolean Expr(Scrib_proc_args args, Scrib_proc_rslt rslt) {
   byte[] expr_bry =
       args.Xstr_bry_or_null(
           0); // NOTE: some modules will pass in an int; PAGE:en.w:531_BC DATE:2016-04-29
   Bry_bfr tmp_bfr = core.Wiki().Utl__bfr_mkr().Get_b128();
   Pfunc_expr.Evaluate(tmp_bfr, core.Ctx(), expr_bry);
   String expr_rslt = tmp_bfr.To_str_and_rls();
   return rslt.Init_obj(
       expr_rslt); // NOTE: always return rslt; don't throw error even if expr is invalid;
                   // EX:mw.ParserFuntion.expr('fail'); PAGE:es.w:Freer_(Texas) DATE:2015-07-28
 }
Esempio n. 2
0
 public Scrib_lua_mod Register(Scrib_core core, Io_url script_dir) {
   this.core = core;
   Init();
   mod =
       core.RegisterInterface(
           this,
           core.App()
               .Fsys_mgr()
               .Bin_xtns_dir()
               .GenSubFil_nest("ParserFunctions", "mw.ext.ParserFunctions.lua"));
   return mod;
 }