in reply to Clarifying the Comma Operator
but I worry that identifier might have limitations that would not be appropriate.Don't. Think about it. When parsing, on encountering a possible 'bare word', the parser doesn't look ahead and say "hmmm, let me see, if the token following this bare word thingy isn't a fat comma, I'm going to parse it as an identifier, because it's got to be a subroutine or a file/dir handle, but if it isn't followed by a fat comma, I'm going to accept something slightly different". No, the parser is going to parse something that may be a valid identifier. Then it looks whether it's in autoquoting context (next token is a fat comma, or we're indexing in a hash and the next token is a close brace), in which case the thing just parsed is a string, otherwise, it is indeed an identifier (subroutine, file/dir handle).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Clarifying the Comma Operator
by ig (Vicar) on Jun 07, 2009 at 01:41 UTC |