Diff
Not logged in

Differences From Artifact [a63938dc88b0c424]:

To Artifact [232a7f3469a1ed88]:


68 68 throw genex!RuntimeException(pos, "if takes three arguments!!"); 69 69 if( auto x = cast(IntValue)args[0] ) 70 70 if( auto ft = cast(FunValue)args[1] ) 71 71 if( auto fe = cast(FunValue)args[2] ) 72 72 return (x.data == 0 ? fe : ft).call(pos,lay,[]); 73 73 throw genex!RuntimeException(pos, "type mismatch in if"); 74 74 })); 75 + ctx.set("_isint", "@v", native( (Value v){return new IntValue(BigInt(cast(IntValue)v is null ? 0 : 1));} )); 76 + ctx.set("_isstr", "@v", native( (Value v){return new IntValue(BigInt(cast(StrValue)v is null ? 0 : 1));} )); 77 + ctx.set("_isfun", "@v", native( (Value v){return new IntValue(BigInt(cast(FunValue)v is null ? 0 : 1));} )); 75 78 return ctx; 76 79 } 77 80 78 81 /// Entry point of this module 79 82 80 83 Tuple!(Value,"val",Table,"ctx") evalString(S,T...)(S str, T fn_ln_cn) 81 84 {