in reply to Creating Perl5 plugin for Intellij IDEA (Camelcade)
It's really awesome that perl still has a lot to teach after years of programming experience :)
Encountered a code, which i can't interpret (so as my parser). This is a part of PPI::Lexer. We've got an array:
And somewhere else we have such code:@CURLY_LOOKAHEAD_CLASSES = ( {}, # not used { ';' => 'PPI::Structure::Block', # per perlref '}' => 'PPI::Structure::Constructor', }, { '=>' => 'PPI::Structure::Constructor', }, );
How does it work? We are assigning list element to the class and what is $Next block?elsif ( my $class = $CURLY_LOOKAHEAD_CLASSES[$position] {$Next->content} )
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Learning perl, after years... (deref)
by tye (Sage) on May 03, 2015 at 18:44 UTC | |
by hurricup (Pilgrim) on May 03, 2015 at 19:55 UTC |