Comments after JSX require leading space
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
Create a project and install:
bsb -init commentbug -theme react
cd commentbug
npm install
Edit file Component1.re on line 20 to read as follows, with the comment’s opening / immediately following the >:
<div onClick=(self.handle(handleClick))>/* comment */
Now compile with bsb -make-world:
File "/home/username/commentbug/src/Component1.re", line 20, characters 43-44:
Error: 3764: <syntax error>
Go back to Component1.re and add a space after the closing >, and re-compile -- everything works great.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the syntax error using the bsb -init commentbug -theme react and bsb -make-world commands, with the example in src/Component1.re. Start by tracing how the compiler handles a JSX closing > followed immediately by a comment; done means the comment form compiles without requiring a leading space.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ocaml
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100