Skip to content

Errors from enviodev/hyperindex #293

Description

@aspeddro

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:

~chain=#1: chainId

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.

Activity

  1. added a commit that references this issue on Jul 11, 2026
    ae672d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions