Skip to content

Commit 58a4838

Browse files
committed
Don't use X<;>
Part of #4099
1 parent 397d87f commit 58a4838

15 files changed

+179
-80
lines changed

doc/Language/classtut.rakudoc

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ my $eat =
7979
$eat.perform();
8080
=end code
8181

82-
X<|Tutorial,class;Tutorial,state>
83-
=head1 X<Class|Tutorial,class;Tutorial,state>
82+
=head1 X<Class|Tutorial,class>
8483

84+
X<|Tutorial,state>
8585
Raku, like many other languages, uses the C<class> keyword to define a
8686
class. The block that follows may contain arbitrary code, just as with
8787
any other block, but classes commonly contain state and behavior
@@ -90,8 +90,10 @@ through the C<has> keyword, and behaviors, introduced through the C<method>
9090
keyword.
9191

9292

93-
=head1 X<Attributes|Tutorial,attributes;Tutorial,encapsulation;Tutorial,has>
93+
=head1 X<Attributes|Tutorial,attributes>
9494

95+
X<|Tutorial,encapsulation>
96+
X<|Tutorial,has>
9597
In the C<Task> class, the first three lines inside the block all
9698
declare attributes (called I<fields> or I<instance storage> in other
9799
languages) using the C<has> declarator. Just as a C<my> variable cannot be
@@ -100,8 +102,10 @@ accessible from outside of the class (this is in contrast to many other
100102
languages). This I<encapsulation> is one of the key principles of object
101103
oriented design.
102104

103-
=head2 X<Twigil C<$!>|Tutorial,twigils;Tutorial,!;Tutorial,&>
105+
=head2 X<Twigil C<$!>|Tutorial,twigils>
104106

107+
X<|Tutorial,!>
108+
X<|Tutorial,&>
105109
The first declaration specifies instance storage for a callback (i.e.
106110
a bit of code to invoke in order to perform the task that an object
107111
represents):
@@ -174,7 +178,8 @@ so external code can modify the value of the attribute.
174178
=for code
175179
has &!callback is built;
176180

177-
X<|Types,traits;Types,is built>
181+
X<|Types,traits>
182+
X<|Types,is built>
178183
By default private attributes are not automatically set by the default constructor. (They are private after
179184
all.) In the above example we want to allow the user to provide the initial value but keep the attribute
180185
otherwise private. The L<C<is built>|/type/Attribute#trait_is_built> trait allows to do just that.
@@ -192,7 +197,8 @@ The C<is built> trait was introduced in Rakudo release 2020.01.
192197

193198
=head2 C<is required> trait
194199

195-
X<|Types,traits;Types,is required>
200+
X<|Types,traits>
201+
X<|Types,is required>
196202
Providing a value for an attribute during initialization is optional by default. Which in the task example
197203
makes sense for all three, the C<&!callback>, the C<@!dependencies> and the C<$.done> attribute. But lets say
198204
we want to add another attribute, C<$.name>, that holds a tasks name and we want to force the user to
@@ -357,8 +363,9 @@ C<$!done> attribute to C<True>, so that subsequent invocations of C<perform>
357363
on this object (if this C<Task> is a dependency of another C<Task>, for
358364
example) will not repeat the task.
359365

360-
=head2 X<Private methods|Tutorial,FQN;Tutorial,Private methods>
366+
=head2 X<Private methods|Tutorial,FQN>
361367

368+
X<|Tutorial,Private methods>
362369
Just like attributes, methods can also be private. Private methods are declared
363370
with a prefixed exclamation mark. They are called with C<self!> followed by the
364371
method's name. In the following implementation of a C<MP3TagData> class to
@@ -596,8 +603,9 @@ eating dinner. NOM!
596603
=end code
597604

598605

599-
=head2 X<A word on types|Tutorial,type object;Tutorial,DEFINITE>
606+
=head2 X<A word on types|Tutorial,type object>
600607

608+
X<|Tutorial,DEFINITE>
601609
Declaring a class creates a new I<type object> which, by default, is installed
602610
into the current package (just like a variable declared with C<our> scope).
603611
This type object is an "empty instance" of the class. For example, types such as

doc/Language/functions.rakudoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ sub format(Str $s) { ... }
139139
Details about the syntax and use of signatures can be found in the
140140
L<documentation on the C<Signature> class|/type/Signature>.
141141

142-
=head3 X<Automatic signatures|Variables,@_;Variables,%_>
142+
=head3 X<Automatic signatures|Variables,@_>
143143

144+
X<|Variables,%_>
144145
If no signature is provided but either of the two automatic variables C<@_> or
145146
C<%_> are used in the function body, a signature with C<*@_> or C<*%_> will be
146147
generated. Both automatic variables can be used at the same time.
@@ -883,7 +884,10 @@ prefix the operator name with an C<&>-sigil.
883884
say "abc" ieq "Abc";
884885
# OUTPUT: «True␤»
885886

886-
=head2 X<Precedence|Traits,is tighter;Traits,is equiv;Traits,is looser>
887+
=head2 X<Precedence|Traits,is tighter>
888+
889+
X<|Traits,is equiv>
890+
X<|Traits,is looser>
887891

888892
Operator precedence in Raku is specified relative to existing operators. The
889893
traits C<is tighter>, C<is equiv> and C<is looser> can be provided with an

doc/Language/glossary.rakudoc

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ sub the-answer() { 42 } # arity of 0
174174
The arity of a L<C<Callable>|/type/Callable> is one of the main selectors in
175175
L<multi-dispatch|#Multi-dispatch>.
176176

177-
=head1 X<ASCII operator|Language,ASCII operator;Language,Texas operator>
177+
=head1 X<ASCII operator|Language,ASCII operator>
178178

179+
X<|Language,Texas operator>
179180
=begin comment
180181
“Texas” was used in the past but is now discouraged.
181182
Remove the link when “Texas” goes completely out of use.
@@ -255,8 +256,9 @@ MoarVM or the Java Virtual Machine, the two VMs currently supported.
255256

256257
A butterfly image intended primarily to represent Raku, The Language.
257258

258-
=head1 X<Colon pair and colon list|Reference,Colon Pair;Reference,Colon List>
259+
=head1 X<Colon pair and colon list|Reference,Colon Pair>
259260

261+
X<|Reference,Colon List>
260262
A colon pair is a shorthand syntax used to create or visually present
261263
a L<C<Pair>|/type/Pair> object. The two most common forms are:
262264

@@ -470,8 +472,9 @@ acting like a regular user (as far as the IRC server is concerned) and
470472
performing some tasks that may involve answering to users requests.
471473
Examples can be found L<on the IRC page of raku.org|https://raku.org/community/irc>.
472474

473-
=head2 X<Compilation unit or I<compunit>|Reference,compunit (glossary);Reference,compilation unit>
475+
=head2 X<Compilation unit or I<compunit>|Reference,compunit (glossary)>
474476

477+
X<|Reference,compilation unit>
475478
A L<compunit|https://github.com/rakudo/rakudo/blob/master/docs/module_management.md>
476479
is a piece of Raku code that is analyzed and compiled as a single unit.
477480
Typically, this piece of code will be contained in a single file, but code
@@ -612,8 +615,9 @@ See also L<https://en.wikipedia.org/wiki/Larry_Wall>.
612615
Performing L<lexical analysis|https://en.wikipedia.org/wiki/Lexical_analysis>,
613616
a step which usually precedes parsing.
614617

615-
=head1 X<LHS|Reference,LHS;Reference,Left-hand side>
618+
=head1 X<LHS|Reference,LHS>
616619

620+
X<|Reference,Left-hand side>
617621
As an acronym left-hand side, it usually refers to the left-hand side of
618622
an expression, and more specifically to the left-hand side of
619623
expressions such as C<$lhs = "this would be the right-hand side">. Since
@@ -700,8 +704,9 @@ MoarVM has some similarities with the Hotspot VM so you may peruse its
700704
L<glossary|http://openjdk.java.net/groups/hotspot/docs/HotSpotGlossary.html>
701705
for entries missing from the present one.
702706

703-
=head1 X<Multi-dispatch|Reference,Multi-Dispatch;Reference,MMD>
707+
=head1 X<Multi-dispatch|Reference,Multi-Dispatch>
704708

709+
X<|Reference,MMD>
705710
The mechanism used to invoke different routines (L<C<Method>|/type/Method>s or
706711
L<C<Sub>|/type/Sub>s) of the same name, selecting the correct one based on the
707712
L<C<Parameter>|/type/Parameter> prototype and the arguments it was called with.
@@ -900,8 +905,9 @@ loads modules, managing their installation and precompilation. They are
900905
structured as linked lists, including chain of repositories ending in
901906
the default C<Compunit::Repository::Installation>.
902907

903-
=head1 X<RHS|Reference,RHS;Reference,Right-hand side>
908+
=head1 X<RHS|Reference,RHS>
904909

910+
X<|Reference,Right-hand side>
905911
Acronym for right-hand side, usually refers to the right-hand side of
906912
assignment operators and expressions such as C<my $bound := $rhs> or
907913
C<my $a = 5; $a //= $rhs>. See
@@ -1029,8 +1035,9 @@ L<Exegeses|#Exegesis>.
10291035
A piece of code that isn't immediately executed, but doesn't have an independent
10301036
scope.
10311037

1032-
=head1 X<Tight and loose precedence|Reference,Tight;Reference,Loose>
1038+
=head1 X<Tight and loose precedence|Reference,Tight>
10331039

1040+
X<|Reference,Loose>
10341041
In this context, tight or tighter refers to
10351042
L<precedence rules|/language/functions#Precedence>
10361043
and is the opposite of C<looser>. Precedence rules for new terms are

doc/Language/grammars.rakudoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ should only be used to parse text; if you wish to extract complex data, you can
9191
add actions within the grammar or use an L<action
9292
object|/language/grammars#Action_objects> in conjunction with the grammar.
9393

94-
=head2 X«Proto regexes|Syntax,:sym<>;Language,proto regex;Syntax,grammar»
94+
=head2 X«Proto regexes|Syntax,:sym<>»
9595

96+
X«|Language,proto regex»
97+
X«|Syntax,grammar»
9698
L<C<Grammar>|/type/Grammar>s are composed of rules, tokens and regexes; these are
9799
actually methods, since grammars are classes.
98100

doc/Language/hashmap.rakudoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ You can assign to multiple keys at the same time with a slice.
275275
my %h; %h<a b c> = 2 xx *; %h.raku.say; # OUTPUT: «{:a(2), :b(2), :c(2)}␤»
276276
my %h; %h<a b c> = ^3; %h.raku.say; # OUTPUT: «{:a(0), :b(1), :c(2)}␤»
277277

278-
=head2 X<Non-string keys (object hash)|Language,non-string keys;Language,object hash;Syntax,:{}>
278+
=head2 X<Non-string keys (object hash)|Language,non-string keys>
279279

280+
X<|Language,object hash>
281+
X<|Syntax,:{}>
280282
By default keys in C<{ }> are forced to strings. To compose a hash with
281283
non-string keys, use a colon prefix:
282284

doc/Language/list.rakudoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,9 @@ they are Lists and are accepted wherever lists are.
571571
A fourth, more subtle, way they differ is that when working with Arrays, it
572572
can sometimes be harder to maintain laziness or work with infinite sequences.
573573

574-
=head2 X<Typing|Language,typed array;Syntax,[ ] (typed array)>
574+
=head2 X<Typing|Language,typed array>
575575

576+
X<|Syntax,[ ] (typed array)>
576577
Arrays may be typed such that their slots perform a typecheck whenever
577578
they are assigned to. An Array that only allows L<C<Int>|/type/Int> values to be assigned
578579
is of type C<Array[Int]> and one can create one with C<Array[Int].new>. If

doc/Language/objects.rakudoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ This restricts their visibility to the current lexical scope, which can be
165165
useful if the class is an implementation detail nested inside a module or
166166
another class.
167167

168-
=head2 X<Attributes|Language,Attribute;Other languages,Property;Other languages,Member;Other languages,Slot>
168+
=head2 X<Attributes|Language,Attribute>
169169

170+
X<|Other languages,Property>
171+
X<|Other languages,Member>
172+
X<|Other languages,Slot>
170173
Attributes are variables that exist per instance of a class; when instantiated
171174
to a value, the association between the variable and its value is called a
172175
X<property|Language,Property>. They are where the state of an object is stored. In Raku, all

doc/Language/operators.rakudoc

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,17 +432,23 @@ There are shortcuts for C<!==> and C<!eq>, namely C<!=> and C<ne>.
432432
my $today = Date.today;
433433
say so $release !before $today; # OUTPUT: «False␤»
434434

435-
=head2 X<Reversed operators|Metaoperators,R;Metaoperators,reverse metaoperator>
435+
=head2 X<Reversed operators|Metaoperators,R>
436436

437+
X<|Metaoperators,reverse metaoperator>
437438
Any infix operator may be called with its two arguments reversed by
438439
prefixing with C<R>. Associativity of operands is reversed as well.
439440

440441
say 4 R/ 12; # OUTPUT: «3␤»
441442
say [R/] 2, 4, 16; # OUTPUT: «2␤»
442443
say [RZ~] <1 2 3>,<4 5 6> # OUTPUT: «(41 52 63)␤»
443444

444-
=head2 X<<<Hyper operators|Operators,<<;Operators,>>;Operators,«;Operators,»;Operators,»=«;Operators,«=»>>>
445+
=head2 X«Hyper operators|Operators,<<»
445446

447+
X«|Operators,>>»
448+
X<|Operators,«>
449+
X<|Operators,»>
450+
X<|Operators,»=«>
451+
X<|Operators,«=»>
446452
Hyper operators include C<«> and C<»>, with their ASCII variants C«<<» and
447453
C«>>». They apply a given operator enclosed (or preceded or followed, in the
448454
case of unary operators) by C<«> and/or C<»> to one or two lists, returning the
@@ -621,8 +627,9 @@ default:
621627

622628
See L<infix:<Z>|#infix_Z> for more about this usage.
623629

624-
=head2 X<Sequential operators|Metaoperators,S;Metaoperators,sequential metaoperator>
630+
=head2 X<Sequential operators|Metaoperators,S>
625631

632+
X<|Metaoperators,sequential metaoperator>
626633
The sequential metaoperator, C<S>, will suppress any concurrency or reordering
627634
done by the optimizer. Most simple infix operators are supported.
628635

@@ -642,7 +649,8 @@ compiler understand you.
642649

643650
=head2 term C«< >»
644651

645-
The X<quote-words|Terms,qw;Terms,quote-words> construct breaks up the contents on whitespace
652+
X<|Terms,quote-words>
653+
The X<quote-words|Terms,qw> construct breaks up the contents on whitespace
646654
and returns a L<C<List>|/type/List> of the words. If a word looks like a number
647655
literal or a L<C<Pair>|/type/Pair> literal, it's converted to the appropriate number.
648656

@@ -666,7 +674,9 @@ being interpreted as a named argument.
666674

667675
=head2 term C«{ }»
668676

669-
L<C<Block>|/type/Block> or L<C<Hash>|/type/Hash> constructor. X<|Terms,block constructor;Terms,hash constructor>
677+
X<|Terms,block constructor>
678+
X<|Terms,hash constructor>
679+
L<C<Block>|/type/Block> or L<C<Hash>|/type/Hash> constructor.
670680

671681
If the content is empty, or contains a single list that starts with a L<C<Pair>|/type/Pair>
672682
literal or C<%>-sigiled variable, and the L«C<$_> variable|/syntax/$_» or
@@ -707,7 +717,8 @@ Terms have their L<own extended documentation|/language/terms>.
707717
:$k, :$v, :$kv, :$p, :$exists, :$delete)
708718

709719
Universal interface for positional access to zero or more elements of
710-
@container, a.k.a. "X<array indexing operator|Postcircumfix operators,array indexing operator;Postcircumfix operators,array subscript operator>".
720+
@container, a.k.a. "X<array indexing operator|Postcircumfix operators,array indexing operator>".
721+
X<|Postcircumfix operators,array subscript operator>
711722

712723
my @alphabet = 'a' .. 'z';
713724
say @alphabet[0]; # OUTPUT: «a␤»
@@ -729,7 +740,8 @@ operator's behavior and for how to implement support for it in custom types.
729740
:$k, :$v, :$kv, :$p, :$exists, :$delete)
730741

731742
Universal interface for associative access to zero or more elements of a
732-
%container, a.k.a. "X<hash indexing operator|Postcircumfix operators,hash indexing operator;Postcircumfix operators,hash subscript operator>".
743+
%container, a.k.a. "X<hash indexing operator|Postcircumfix operators,hash indexing operator>".
744+
X<|Postcircumfix operators,hash subscript operator>
733745

734746
my %color = kiwi => "green", banana => "yellow", cherry => "red";
735747
say %color{"banana"}; # OUTPUT: «yellow␤»

doc/Language/packages.rakudoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ In the same vein, class and method names can be interpolated too:
198198
$what-method = 'another-method';
199199
say a-class."$what-method"(); # OUTPUT: «in-another-method␤»
200200

201-
=head2 X<Direct lookup|Syntax,::($c).m;Syntax,A."$m"()>
201+
=head2 X<Direct lookup|Syntax,::($c).m>
202202

203+
X<|Syntax,A."$m"()>
203204
To do direct lookup in a package's symbol table without scanning, treat the
204205
package name as a hash:
205206

doc/Language/quoting.rakudoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ described in more detail in the following sections.
1919
For information about quoting as applied in regexes, see the L<regular
2020
expression documentation|/language/regexes>.
2121

22-
=head2 X<Literal strings: Q|Syntax,Q;Syntax,「 」>
22+
=head2 X<Literal strings: Q|Syntax,Q>
23+
24+
X<|Syntax,「 」>
2325

2426
=for code :skip-test<listing>
2527
Q[A literal string]
@@ -131,8 +133,10 @@ say Q:a "Array contains @þ.elems()"; # OUTPUT: «Array contains 2␤»
131133
The same code without the parentheses will simply not interpolate, absent the
132134
post-circumfix operator.
133135

136+
=head2 X<Escaping: q|Syntax,q>
137+
134138
X<|Syntax,escaping quote>
135-
=head2 X<Escaping: q|Syntax,q;Syntax,' '>
139+
X<|Syntax,' '>
136140

137141
=begin code
138142
'Very plain';
@@ -172,7 +176,9 @@ HTML markup is involved, to avoid interpretation of angle brackets as hash keys:
172176
say '<code>$var</code> is <var>\qq[$var.uc()]</var>';
173177
# OUTPUT: «<code>$var</code> is <var>FOO</var>␤»
174178

175-
=head2 X<Interpolation: qq|Syntax,qq;Syntax," ">
179+
=head2 X<Interpolation: qq|Syntax,qq>
180+
181+
X<|Syntax," ">
176182

177183
=begin code
178184
my $color = 'blue';
@@ -453,8 +459,9 @@ just literal quote characters:
453459
my $b = "1 \"2 3\"";
454460
say qqww{"$b" $b}.raku; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤»
455461

456-
=head2 X<<<Word quoting with interpolation and quote protection: « »|Syntax,<< >>;Syntax,« »>>>
462+
=head2 X<<<Word quoting with interpolation and quote protection: « »|Syntax,<< >>>>>
457463

464+
X<<<|Syntax,« »>>>
458465
This style of quoting is like C<qqww>, but with the added benefit of
459466
constructing L<allomorphs|/language/glossary#Allomorph> (making it
460467
functionally equivalent to L<qq:ww:v|#index-entry-:val_(quoting_adverb)>). The

0 commit comments

Comments
 (0)