[Padre-dev] Perl 6 highlighting issue
Ahmad Zawawi
ahmad.zawawi at gmail.com
Sun Jan 25 10:49:21 PST 2009
Hi Gabor,
Sorry for the late response but i was quite busy lately. I tried it
and it STD parses correctly. Common problems can include: Win32 CRLF
EOL or an old lex cache directory.
Please try the following command on your machine and then open
URI.html in your browser.
$ hilitep6 --full-html=URI.html URI.pm
Regards,
Ahmad
On Fri, Jan 23, 2009 at 9:49 PM, Gabor Szabo <szabgab at gmail.com> wrote:
> Hi Azawai,
>
> I was trying to open the p6w/URI.pm file of November (the wiki) using
> v0.025 of the Perl6 plugin (on Padre 0.25)
> and it could not color correctly lines 21-25
>
> Here is the beginning of the file though it has issues later on as
> well so you might want to get the source code
> of all November and look around using Padre to see if there other issues.
>
> regards
> Gabor
>
>
> class URI;
>
> # RAKUDO: Match object does not do assignment properly :(
> #my Match $.parts; dies in init with 'Type mismatch in assignment';
> # workaround:
> has $.uri;
> has @.chunks;
>
> method init ($str) {
> use URI::Grammar;
>
> # clear string before parsing
> my $c_str = $str;
> $c_str .= subst(/^ \s* ['<' | '"'] /, '');
> $c_str .= subst(/ ['>' | '"'] \s* $/, '');
>
> URI::Grammar.parse($c_str);
> unless $/ { die "Could not parse URI: $str" }
>
> $!uri = $/;
> @!chunks = $/<path><chunk> // ('');
> }
>
> method scheme {
> my $s = $.uri<scheme> // '';
> # RAKUDO: return 1 if use ~ below die because can`t do lc on Math after
> return ~$s.lc;
> }
> _______________________________________________
> Padre-dev mailing list
> Padre-dev at perlide.org
> http://mail.perlide.org/mailman/listinfo/padre-dev
>
More information about the Padre-dev
mailing list