Skip to content

Commit

Permalink
fix compilation test
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed May 23, 2018
1 parent 88ff1d5 commit d66a01a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/Language/grammar_tutorial.pod6
Expand Up @@ -305,7 +305,7 @@ Will output exactly the same as the code above. Symptomatic of the difference
between Classes and Roles, a conflict like defining C<token quote> twice
using Role composition will result in an error:
=begin code
=begin code :skip-test<compilation error>
grammar Quoted-Quotes does Letters does Quote-Quotes does Quote-Other { ... }
# OUTPUT: ... Error while compiling ... Method 'quote' must be resolved ...
=end code
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/js-nutshell.pod6
Expand Up @@ -183,7 +183,7 @@ to Numeric if they're different types, C<eq> will cast them to strings:
=begin code
say '1' eq '1'; # True
say 1 eq '1'; # True
=end code;
=end code
The inverse of C<eq> is C<ne> or C<!eq>.
Expand All @@ -207,7 +207,7 @@ have the same value, but different containers, will return false:
=begin code
say 1 === 1; # True
say '1' === 1; # True
say {} === {} # False
say {} === {}; # False
my \hash = {};
my %hash := hash;
Expand All @@ -225,7 +225,7 @@ library for in Node.js:
say {a => 1} eqv {a => 1}; # True;
my \hash = {};
my %hash := hash
my %hash := hash;
say hash eqv %hash; # True
=end code
Expand Down Expand Up @@ -264,7 +264,7 @@ console.log(typeof 'foo'); // string
console.log('foo'.constructor); // String
=end code
=begin code
=begin code :ok-test<WHAT>
say 'foo'.WHAT; # (Str)
=end code
Expand Down
2 changes: 2 additions & 0 deletions doc/Language/modules.pod6
Expand Up @@ -414,13 +414,15 @@ Be careful I<not> to put C<sub EXPORT> after L«C<unit> declarator|/syntax/unit
If you do so, it'll become just a sub inside your package, rather than the special
export sub:
=begin code :skip-test<unit module can't work here>
unit module Bar;
sub EXPORT { %(Foo => &say) } # WRONG!!! Sub is scoped wrong
# ---------
sub EXPORT { %(Foo => &say) } # RIGHT!!! Sub is outside the module
unit module Bar;
=end code
=head2 Finding Modules
Expand Down
5 changes: 4 additions & 1 deletion doc/Language/temporal.pod6
Expand Up @@ -77,7 +77,10 @@ This very variable is also used to compute the month of the year when the file w
C<Duration> objects can be compared. This is used in
$^a.value<age> <=> $^b.value<age>
=for code :preamble<my %metadata>
%metadata.sort({
$^a.value<age> <=> $^b.value<age>
});
to sort the files by age.
Expand Down

0 comments on commit d66a01a

Please sign in to comment.