does ":b(2) :c(3)" mean "a pair ':b(2)' with an adverb ':c(3)'"? If so
I agree it's a big potential opportunity for mistakes.
-y


On Thu, Dec 5, 2013 at 10:01 AM, Richard Hainsworth
<rich...@rusrating.ru> wrote:
> A difficult bug in a program led to the problem below. I am not sure if it
> is a bug in rakudo or not, but it seems a nasty place for typos if it ain't.
>
> I was using pair notation to define a hash. I missed a comma on the end of
> one of the pairs, which led to the next pair not being recognised.
>
> I then introduced the => for defining the hash and the same mistake was
> caught. Note that in running the script the second mistake is caught (viz.
> using =>) but the first mistake (using :xx() ) is not.
>
> $ perl6 -v
> This is perl6 version 2013.09 built on parrot 5.5.0 revision 0
> $ cat test.p6
> use v6;
>
> my %x = (
> :a(1),
> :b(2)
> :c(3)
> );
>
> my %y = (
> a => 1,
> b => 2
> c => 3
> );
> $ perl6 test.p6
> ===SORRY!=== Error while compiling test.p6
> Two terms in a row
> at test.p6:12
> ------> ⏏c => 3
> expecting any of:
> postfix
> infix stopper
> infix or meta-infix
> statement end
> statement modifier
> statement modifier loop
> $
>
>

Reply via email to