Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc colon pair as part of identifier
  • Loading branch information
gfldex committed Jul 23, 2016
1 parent caa99e1 commit a27516d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/Language/syntax.pod6
Expand Up @@ -185,6 +185,16 @@ or automatically created packages.
my Int $Foo::Bar::buzz = 42;
dd $Foo::Bar::buzz; # OUTPUT«Int $v = 42␤»
Identifiers can contain colon pairs. The entire colon pair becomes part of the
name of the identifier.
my $foo:bar = 1;
my $foo:bar<2> = 2;
dd MY::.keys;
# OUTPUT«("\$=pod", "!UNIT_MARKER", "EXPORT", "\$_", "\$!", "::?PACKAGE",
# "GLOBALish", "\$¢", "\$=finish", "\$/", "\$foo:bar<1>", "\$foo:bar<2>",
# "\$?PACKAGE").Seq␤»
=head1 Statements and Expressions
Perl 6 programs are made of lists of statements. A special case of a statement
Expand Down

0 comments on commit a27516d

Please sign in to comment.