Skip to content

Newest ocaml grammar incompatible with current ocaml file #1068

@mkatychev

Description

@mkatychev

Describe the bug
Though the newest ocaml grammar should be more performant than the existing one:

$ cat ocaml/grammars/ocaml/src/parser.c | rg "#define.*STATE"
#define STATE_COUNT 8273
#define LARGE_STATE_COUNT 1733

The current input & expected ocaml.ml produces (ERROR) nodes when using latest gramamr

To Reproduce
Modifying the rev below to 3ef7c00b29e41e3a0c1d18e82ea37c64d72b93fc should produce errors

ocaml = {
extensions = ["ml"],
grammar.source.git = {
git = "https://github.com/tree-sitter/tree-sitter-ocaml.git",
rev = "a45fda5fe73cda92f2593d16340b3f6bd46674b8",
subdir = "grammars/ocaml",
nixHash = "sha256-u8R3JvjaOrW6kCX1hNTGMl86HnKAoopSMvHr8Sj0i04=",
},
},

Expected behavior
Though node names are not expected to be backwards compatible, documents to parse should

Environment

  • OS name + version: macOS
  • Version of the code: latest main

Additional context
#859

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