Annotation of parser3/tests/224.html, revision 1.5

1.1       misha       1: @USE
                      2: 224.p
                      3: 
                      4: 
                      5: @main[]
                      6: $h[^reflection:classes[]]
                      7: $hi[^h.intersection[
                      8:        $.hash[]
                      9:        $.env[]
                     10:        $.cookie[]
                     11:        $.table[]
                     12:        $.test[]
                     13:        $.test1[]
                     14:        $.test2[]
                     15: ]]
1.2       misha      16: $t[^hi._keys[]]
                     17: ^t.sort{$t.key}
                     18: ^t.menu{$t.key^if(def $hi.[$t.key]){ - $hi.[$t.key]}}[<br />]
1.1       misha      19: <hr />
                     20: 
                     21: ^do{$d[^reflection:create[date;create]]}
                     22: ^do{$d[^reflection:create[date;calendar]]}
                     23: ^do{$d[^reflection:create[date;now](-2;1)]}
                     24: ^do{$d[^reflection:create[date;now](-2)]}
                     25: 
                     26: ^do{$o[^reflection:create[test;create](-1)]}
1.4       misha      27: ^do{$o0[^reflection:create[test;create0]]}
1.1       misha      28: ^do{$o1[^reflection:create[test1;create1](1)]}
                     29: ^do{$o2[^reflection:create[test2;create2]]}
                     30: <hr />
                     31: 
                     32: ^reflection:class_name[$hash:CLASS]<br />
                     33: ^reflection:class_name[$cookie:CLASS]<br />
                     34: ^reflection:class_name[$env:CLASS]<br />
                     35: <hr />
                     36: 
                     37: ^print[test;$o]
                     38: ^print[test1;$o1]
                     39: ^print[test2;$o2]
                     40: ^print[date;$d]
                     41: ^print[env;$env:CLASS]
                     42: ^print[unknown]
1.5     ! misha      43: <hr />
        !            44: 
        !            45: ^test2:m[]
        !            46: $o[^test2::create[]]
        !            47: ^o.m[]
        !            48: 
        !            49: $h[^reflection:fields[$o.CLASS]]
        !            50: ^h.foreach[k;v]{$k=$v}[, ]<br />
        !            51: 
        !            52: $h[^reflection:fields[$o]]
        !            53: ^h.foreach[k;v]{$k=$v}[, ]<br />
1.1       misha      54: done.
                     55: 
                     56: 
                     57: 
                     58: @do[code]
                     59: ^try{
                     60:        $code
                     61: }{
                     62:        $exception.handled(1)
                     63:        $exception.source
                     64:        $exception.comment
                     65:        <br />
                     66: }
                     67: 
                     68: 
                     69: 
1.2       misha      70: @print[class;o][m;k;v;h;i;t]
1.1       misha      71: ^do{
                     72:        $m[^reflection:methods[$class]]
1.2       misha      73:        $t[^m._keys[]]
                     74:        ^t.sort{$t.key}
                     75:        ^t.menu{
                     76:                $k[$t.key]
                     77:                $v[$m.$k]
1.3       misha      78:                $h[^reflection:method_info[$class;$k]]
1.4       misha      79:                ^@${k}[^if($v eq "native"){^if($h.min_params != $h.max_params){^h.min_params.int(0)-}^h.max_params.int(0)}{^for[i](0;^h._count[]-1){$h.$i}[^;]}]^if(def $h.call_type){ {$h.call_type}}^if(def $h.inherited){ {defined in $h.inherited}}
1.1       misha      80:        }[<br />]
                     81: }
                     82: ^if(def $o){
                     83:        ^if($m){<br /><br />}
                     84:        '$class' object class name: '^reflection:class_name[$o]/^reflection:class_name[^reflection:class[$o]]'<br />
                     85:        '$class' object base class name: '^reflection:base_name[$o]/^if(^reflection:base[$o] is "void"){;^reflection:class_name[^reflection:base[$o]]}'<br />
                     86: }
                     87: <hr />
                     88: 

E-mail: