Ejemplo n.º 1
0
 public static byte[] Eval_val_or(
     Xop_ctx ctx,
     byte[] src,
     Xot_invk caller,
     Xot_invk self,
     int self_args_len,
     int i,
     byte[] or) {
   if (i >= self_args_len) return or;
   Bry_bfr bfr = Bry_bfr_.New();
   Arg_nde_tkn nde = self.Args_get_by_idx(i);
   nde.Val_tkn().Tmpl_evaluate(ctx, src, caller, bfr);
   return bfr.To_bry_and_clear_and_trim();
 }
Ejemplo n.º 2
0
 public static byte[] Eval_arg_or(
     Xop_ctx ctx,
     byte[] src,
     Xot_invk caller,
     Xot_invk self,
     int self_args_len,
     int i,
     byte[] or) {
   if (i >= self_args_len) return or;
   Arg_nde_tkn nde = self.Args_get_by_idx(i);
   Bry_bfr bfr = Bry_bfr_.New();
   Eval_arg_or(bfr, ctx, src, caller, self, nde, or);
   return bfr.To_bry_and_clear_and_trim();
 }
Ejemplo n.º 3
0
 public static void Eval_arg_or(
     Bry_bfr bfr,
     Xop_ctx ctx,
     byte[] src,
     Xot_invk caller,
     Xot_invk self,
     Arg_nde_tkn nde,
     byte[] or) {
   nde.Key_tkn()
       .Tmpl_evaluate(
           ctx, src, caller,
           bfr); // NOTE: must add key b/c parser functions do not have keys and some usages pass
   // in xml_tkns; EX: {{#if|<a href='{{{1}}}'|}}; "<a href" should not be
   // interpreted as key
   if (nde.KeyTkn_exists()) bfr.Add_byte(Byte_ascii.Eq);
   nde.Val_tkn().Tmpl_evaluate(ctx, src, caller, bfr);
 }
Ejemplo n.º 4
0
 @Override
 public void Func_evaluate(Bry_bfr bfr, Xop_ctx ctx, Xot_invk caller, Xot_invk self, byte[] src) {
   bfr.Add_byte_pipe();
 }