Skip to content

Commit 69b1eb8

Browse files
committed
Let =TITLE set names of type docs; stub nativeInt.pod as example
Although really, I'm thinking that it's more likely that the int and uint classes are going to end up being defined in a Language/natives.pod file or such along with str and num.
1 parent 9e6656a commit 69b1eb8

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

htmlify.p6

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ sub process-pod-dir($dir, :&sorted-by = &[cmp], :$sparse) {
191191
sub process-pod-source(:$kind, :$pod, :$filename, :$pod-is-complete) {
192192
my $summary = '';
193193
my $name = $filename;
194-
if $kind eq "language" {
195-
if $pod.contents[0] ~~ {$_ ~~ Pod::Block::Named and .name eq "TITLE"} {
196-
$name = $pod.contents[0].contents[0].contents[0]
197-
}
198-
else {
199-
note "$filename does not have an =TITLE";
194+
if $pod.contents[0] ~~ {$_ ~~ Pod::Block::Named and .name eq "TITLE"} {
195+
$name = $pod.contents[0].contents[0].contents[0];
196+
if $kind eq "type" {
197+
$name = $name.split(/\s+/)[*-1];
200198
}
199+
} else {
200+
note "$filename does not have an =TITLE";
201201
}
202202
if $pod.contents[1] ~~ {$_ ~~ Pod::Block::Named and .name eq "SUBTITLE"} {
203203
$summary = $pod.contents[1].contents[0].contents[0];

lib/Type/nativeInt.pod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=begin pod
2+
3+
=TITLE class int
4+
5+
=SUBTITLE A Native (32 or 64 bit) Integer
6+
7+
class int is Int is repr('P6int') { }
8+
9+
TODO
10+
11+
=end pod

type-graph.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ role Real does Numeric
104104
class Int is Cool does Real
105105
class Num is Cool does Real
106106
class Complex is Cool does Numeric
107+
class int is Int
107108

108109
[Basic]
109110
role Rational[::NuT, ::DeT] does Real

0 commit comments

Comments
 (0)