Summary
https://github.com/enviodev/hyperindex
All ten files are valid ReScript. bsc -only-parse accepts every file, so these are parser bugs or missing grammar coverage, not project syntax errors.
1. Typed coercions with a source type
Valid syntax:
(value: sourceType :> targetType)
The grammar only supports value :> targetType. It cannot combine the source annotation with coercion.
Affected files:
This is a missing grammar case in coercion_expression.
2. Member access starting on the next line
Valid syntax:
t
.expect(value)
.toEqual(expected)
The newline scanner does not treat . as a continuation token. It terminates the statement after t, causing the later false MISSING "}" error.
Affected files:
This is a scanner bug, not a missing brace.
3. Type annotation after a parameter default
MockIndexer.res also uses:
The grammar accepts ~chain: chainId=#1, but not the valid post-default annotation order. This is another missing grammar case.
The large ERROR ranges in ClickHouse.res, InternalTable.res, and MockIndexer.res are recovery cascades. The actual problems are the individual constructs above, not the entire reported ranges. Fixing these three parser behaviors should cover all ten files.
Summary
https://github.com/enviodev/hyperindex
All ten files are valid ReScript.
bsc -only-parseaccepts every file, so these are parser bugs or missing grammar coverage, not project syntax errors.1. Typed coercions with a source type
Valid syntax:
The grammar only supports
value :> targetType. It cannot combine the source annotation with coercion.Affected files:
This is a missing grammar case in
coercion_expression.2. Member access starting on the next line
Valid syntax:
The newline scanner does not treat
.as a continuation token. It terminates the statement aftert, causing the later falseMISSING "}"error.Affected files:
This is a scanner bug, not a missing brace.
3. Type annotation after a parameter default
MockIndexer.res also uses:
The grammar accepts
~chain: chainId=#1, but not the valid post-default annotation order. This is another missing grammar case.The large
ERRORranges inClickHouse.res,InternalTable.res, andMockIndexer.resare recovery cascades. The actual problems are the individual constructs above, not the entire reported ranges. Fixing these three parser behaviors should cover all ten files.