# New Ticket Created by equinox # Please include the string: [perl #119353] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=119353 >
Hi, A patch.. I ran the spec test. No regression. jaffa4
>From bdad335a315685f5670dd621235e5a91fff0a075 Mon Sep 17 00:00:00 2001 From: Marton Papp <ante...@freemail.hu> Date: Sun, 18 Aug 2013 13:54:25 +0200 Subject: [PATCH] added recognizing labels --- src/Perl6/Grammar.nqp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Perl6/Grammar.nqp b/src/Perl6/Grammar.nqp index 9249a44..3dc2077 100644 --- a/src/Perl6/Grammar.nqp +++ b/src/Perl6/Grammar.nqp @@ -995,6 +995,21 @@ grammar Perl6::Grammar is HLL::Grammar does STD { ] } + token label { + :my $label; + <identifier> ':' <?before \s> <.ws> + + #[ <?{ $*W.is_name($label := $<identifier>.Str) }> + # <.sorry("Illegal redeclaration of '$label'")> + #]? + + # add label as a pseudo type + #{{ $*W.add_my_name($label); }} + + {self.panic("labels are not yet implemented");} + +} + token statement { :my $*QSIGIL := ''; :my $*SCOPE := ''; @@ -1003,6 +1018,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD { <!stopper> <!!{ nqp::rebless($/.CURSOR, %*LANG<MAIN>) }> [ + | <label> <statement> | <statement_control> | <EXPR> :dba('statement end') [ -- 1.7.11.msysgit.1