reasonml / reasonml/reason

False positive syntax error from menhir's post-processing

Open
#1,903 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Error messages KIND: BUG Parser
Dominant language
OCaml
Stars
10.3k
Forks
438
PR merge metrics
No merged PRs in 30d

Description

Repro:

let toRec2 = t => {
  ...(toRec1(t),
  b: false
};
Error: 1507: false is a reserved keyword, it cannot be used as an identifier. Try `false_' instead

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the Reason snippet from the issue and tracing menhir's post-processing to determine why the valid false property is reported as an identifier. Done means this repro no longer produces the false reserved-keyword syntax error, while genuine reserved-keyword errors remain reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.