@@ -219,7 +219,7 @@ (Bool :$debug, Bool :$typegraph = False)
219
219
}
220
220
221
221
write-disambiguation-files();
222
- write-operator-files();
222
+ write-operator-files($ dr );
223
223
write-type-graph-images(: force($ typegraph ));
224
224
write-search-file();
225
225
write-index-file();
@@ -428,20 +428,21 @@ (Bool :$debug, Bool :$typegraph = False)
428
428
say " ... done writing disambiguation files" ;
429
429
}
430
430
431
- sub write-operator-files () {
431
+ sub write-operator-files ($ dr ) {
432
432
say " Writing operator files" ;
433
- for % operators . kv -> $ what , % ops {
434
- for % ops . kv -> $ op , $ chunk {
435
- my $ pod = pod-with-title(
436
- " $ what. tclc () $ op operator" ,
437
- pod-block(
438
- " Documentation for $ what $ op , extracted from " ,
439
- pod-link(" the operators language documentation" , " /language/operators" )
440
- ),
441
- @$ chunk
442
- );
443
- spurt " html/op/$ what /$ op .html" , p2h($ pod );
444
- }
433
+ for $ dr . lookup(' operator' , : by<kind >). list -> $ doc {
434
+ my $ what = $ doc . subkind;
435
+ my $ chunk = $ doc . pod;
436
+ my $ op = $ doc . name ;
437
+ my $ pod = pod-with-title(
438
+ " $ what. tclc () $ op operator" ,
439
+ pod-block(
440
+ " Documentation for $ what $ op , extracted from " ,
441
+ pod-link(" the operators language documentation" , " /language/operators" )
442
+ ),
443
+ @$ chunk
444
+ );
445
+ spurt " html/op/$ what /$ op .html" , p2h($ pod );
445
446
}
446
447
}
447
448
0 commit comments