Annotation of parser3/tests/366.html, revision 1.1

1.1     ! moko        1: # checking native implementation first
        !             2: @USE
        !             3: 366_dir/test.p
        !             4: 
        !             5: # parser implementation of native ^use[] logic
        !             6: @use[name;options][origin;mi;first;path]
        !             7: $result[]
        !             8: 
        !             9: ^if(^name.left(1) eq '/'){
        !            10:        ^include[$name]
        !            11: }{
        !            12:        $origin[$options.origin]
        !            13: 
        !            14:        ^if(!def $origin){
        !            15:                $mi[^reflection:method_info[$caller.method]]
        !            16:                $origin[$mi.file]
        !            17:        }
        !            18: 
        !            19:        $origin[/^origin.mid(^request:document-root.length[])]
        !            20: 
        !            21:        $first[^file:dirname[$origin]/$name]
        !            22: 
        !            23:        ^if(-f $first){
        !            24:                ^include[$first]
        !            25:        }($CLASS_PATH is table && $CLASS_PATH){
        !            26:                ^CLASS_PATH.menu{
        !            27:                        $path[$CLASS_PATH.path/$name]
        !            28:                        ^if(-f $path){
        !            29:                                ^include[$path]
        !            30:                                $name[]
        !            31:                                ^break[]
        !            32:                        }
        !            33:                }
        !            34:                ^if(def $name){
        !            35:                        ^throw[use;'$name' not found along ^$MAIN:CLASS_PATH]
        !            36:                }
        !            37:        }{
        !            38:                ^throw[use;'$name' usage failed - no ^$MAIN:CLASS_PATH were specified]
        !            39:        }
        !            40: }
        !            41: 
        !            42: @include[filename][file]
        !            43: $filename[^filename.replace[//;/]]
        !            44: ^if(!$USED.$filename){
        !            45:        $file[^file::load[text;$filename]]
        !            46:        ^process[$MAIN:CLASS]{^taint[as-is][$file.text]}[ $.file[$filename] ]
        !            47:        $USED[$USED $.$filename(true)]
        !            48: }
        !            49: 
        !            50: @main[]
        !            51: 
        !            52: native LOG: $LOG
        !            53: $LOG[]
        !            54: ^use[366_dir/test.p]
        !            55: parser LOG: $LOG

E-mail: