Skip to content

Commit

Permalink
Examples and reference to further explanation for Unicode in Perl 6 s…
Browse files Browse the repository at this point in the history
…yntax
  • Loading branch information
ronaldxs committed Dec 9, 2016
1 parent 4d72090 commit b7e4d53
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/Language/syntax.pod6
Expand Up @@ -18,7 +18,9 @@ errors and give good error messages.
=head1 Lexical Conventions
Perl 6 code is Unicode text, current implementations support UTF-8 as the
input encoding.
input encoding. More detail on Perl 6 syntax and Unicode is discussed
in L<Unicode versus Texas symbols|/language/unicode_texas> as well as
parts of other documents related to those topics.
=head2 Free Form
Expand Down Expand Up @@ -167,6 +169,7 @@ alphabetic character.
with-numbers1234
don't
fish-food
π
# not valid identifiers:
with-numbers1234-5
Expand Down Expand Up @@ -195,6 +198,9 @@ name of the identifier.
# "GLOBALish", "\$¢", "\$=finish", "\$/", "\$foo:bar<1>", "\$foo:bar<2>",
# "\$?PACKAGE").Seq␤»
Unicode superscript numerals are exponents and not part of an identifier;
e.g. C<$x²> does the square of variable C<$x>. Subscript numerals are TBD.
=head1 Statements and Expressions
Perl 6 programs are made of lists of statements. A special case of a statement
Expand Down Expand Up @@ -330,6 +336,7 @@ L<Rat|/type/Rat> literals (rationals) are very common, and take the place of dec
3.14159
-2.5 # Not actually a literal, but still a Rat
:3<21.0012> # Base 3 rational
2/3 # Not actually a literal, but still a Rat
=head4 Num literals
Expand Down

0 comments on commit b7e4d53

Please sign in to comment.