Indexing Grammar in combination with vector construction using `[...]` causes ambiguous syntax.
Open
theme-internals
type-design
type-enhancement
- Dominant language
- Rust
- Stars
- 145
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Because `[[` can be used with a single number like `1` and `[` with a vector like `[1]`, it is not clear what the expression `x[[1]]` represents, i.e. does it call `[[` or `[`.
Contributor guide
No contributing guide indexed for this repository
Research direction
No implementation file or test is named in the issue. Start by reading the discussion and locating the parser or grammar entry points for indexing and vector construction, then reproduce x[[1]] and inspect how it is parsed. Done means the expression has an unambiguous, documented interpretation with coverage for the relevant syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100