Overview
SHA1 Hash: | 3a2762fca5c3dee15fbbee59eda696fd17443ddc |
---|---|
Date: | 2010-11-13 13:58:01 |
User: | kinaba |
Comment: | _isXXX |
Timelines: | family | ancestors | descendants | both | trunk |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [f65680e1d2]
- sym-trunk inherited from [f65680e1d2]
Changes
Modified polemy/eval.d from [a63938dc88b0c424] to [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 {