Closed dagolden closed 10 years ago
@goccy
How do I detect split //
regexp or not?
The token is following:
bless( {
'stype' => 0,
'kind' => 1,
'name' => 'DefaultOperator',
'has_warnings' => 0,
'data' => '//',
'type' => 57,
'line' => 5
}, 'Compiler::Lexer::Token' ),
I don't know the details of how it all works, but to be an operator, it needs an expression on both sides:
EXPR // EXPR
If there's a comma or closing symbols, it's either a syntax error or a trivial match on $_
@list = split //, $scalar;
@list = split //;
@list = (split //)[0..2];
{ @list = split // }
[ split // ]
if ( // ) { ... }
This file is said to require 5.010 because
// operator
: