Skip to content

Commit

Permalink
Merge pull request #190 from awwaiid/syntax-links
Browse files Browse the repository at this point in the history
Remove links from headers
  • Loading branch information
jonathanstowe committed Nov 9, 2015
2 parents 8058cb7 + 3c6b9d2 commit b7b41e1
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions doc/Language/syntax.pod
Expand Up @@ -254,24 +254,28 @@ number:
10_0000
10_00_00
=head4 L<Int|/type/Int> literals
=head4 Int literals
Integers default to signed base-10, but you can use other bases. For details,
see L<Int|/type/Int>.
-2
12345
0xBEEF # base 16
0o755 # base 8
:3<1201> # arbitrary base, here base 3
=comment TODO adverbial bases with :20<...>
=head4 Rat literals
=head4 L<Rat|/type/Rat> literals
L<Rat|/type/Rat> literals (rationals) are very common, and take the place of decimals or floats in many other languages. Integer division also results in a C<Rat>.
1.0
3.14159
-2.5
:3<21.0012> # Base 3 rational
2/3 # Not actually a literal, but still a Rat
=comment TODO adverbial bases with :20<...>
=head4 L<Num|/type/Num> literals
=head4 Num literals
Scientific notation with an exponent to base ten after an C<e> produces
L<floating point number|/type/Num>:
Expand All @@ -281,7 +285,7 @@ L<floating point number|/type/Num>:
1e-9
-2e48
=head4 L<Complex|/type/Complex> literals
=head4 Complex literals
L<Complex|/type/Complex> numbers are written either as an imaginary number
(which is just a rational number with postfix C<i> appended), or as a sum of
Expand All @@ -291,9 +295,9 @@ a real and an imaginary number:
6.123e5i
=head3 L<Pair|/type/Pair> literals
=head3 Pair literals
Pairs are made of a key and a value, and there are two basic forms for
L<Pairs|/type/Pair> are made of a key and a value, and there are two basic forms for
constructing them: C<< key => 'value' >> and C<:key('value')>.
=head4 Arrow pairs
Expand Down Expand Up @@ -323,7 +327,7 @@ Long forms with explicit values:
:thing['some', 'values'] # same as thing => ['some', 'values']
:thing{a => 'b'} # same as thing => { a => 'b' }
=head3 L<Array|/type/Array> literals
=head3 Array literals
A pair of square brackets can surround an expression to form an itemized
L<Array|/type/Array> literal; typically there is a comma-delimited list
Expand All @@ -342,7 +346,7 @@ arrays themselves:
# does not flatten:
say [[@a], [3, 4]].elems; # 2
=head3 L<Hash|/type/Hash> literals
=head3 Hash literals
A pair of curly braces can surround a list of pairs to form a
L<Hash|/type/Hash> literal; typically there is a comma-delimited list of pairs
Expand All @@ -359,9 +363,9 @@ When assigning to a C<%> sigil variable, the curly braces are optional.
my %ages = fred => 23, jean => 87, ann => 4;
=head3 L<Regex|/type/Regex> literals
=head3 Regex literals
A regex is declared with slashes like C</foo/>. Note that this C<//> syntax is shorthand for the full C<rx//> syntax.
A L<Regex|/type/Regex> is declared with slashes like C</foo/>. Note that this C<//> syntax is shorthand for the full C<rx//> syntax.
/foo/ # Short version
rx/foo/ # Longer version
Expand Down Expand Up @@ -423,18 +427,18 @@ Inside of a class, you can also declare multi-dispatch methods.
multi method greet { }
multi method greet(Str $name) { }
=head2 L<Subroutine|/language/functions> calls
=head2 Subroutine calls
See L<functions|/language/functions>.
=comment TODO
foo; # Invoke the function foo with no arguments
foo(); # Invoke the function foo with no arguments
$f(); # Invoke $f, which contains a function
=head1 L<Operators|/language/operators>
=comment TODO: link to language/operators
=head1 Operators
=head1
See L<Operators|/language/operators>.
=end pod

0 comments on commit b7b41e1

Please sign in to comment.