HomePhorge

(PUP-2288) Make [ be LISTSTART if first in file or preceded by WS
5edfb6f1f388Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2288) Make [ be LISTSTART if first in file or preceded by WS

The problem was that there was only one special case being handled
by the lexer to dis-ambiguate if an expression followed by [ meant
the start of an access operations (e.g. getting an entry out of an
array), or if it represented the start of a literal array.

The supported special case was NAME followed by non-WS followed by [.

This meant that cases like foo(3) [a,b,c] were always treated as
an access operation.

The fix generalizes the dis-ambiguation so that all access operations
must be written without interleaved WS.

Details

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPU5edfb6f1f388: (PUP-2288) Make [ be LISTSTART if first in file or preceded by WS (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).May 7 2014, 1:48 AM