Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Menhir/OCamlyacc syntax highlighting #91

Merged
merged 1 commit into from
Apr 2, 2020
Merged

Add Menhir/OCamlyacc syntax highlighting #91

merged 1 commit into from
Apr 2, 2020

Conversation

mnxn
Copy link
Collaborator

@mnxn mnxn commented Apr 1, 2020

Addresses #21

Parts of the regex were taken from the Menhir tmLanguage file in https://github.com/hackwaly/vscode-ocaml

Some of the interactions between this grammar and the existing OCaml grammar are unexpected.
For example, everything after List will not be highlighted, but adding ;; after List will make it work fine.

%{
open List
%}
%start <Ast.program> program
%%
program: module_body EOF { Program $1 }

I've deduced that this is a problem with the existing OCaml syntax and I'm working on a much simpler ocaml grammar which I can confirm would fix this problem and other inconsistencies.

I have not found any highlighting issues with the Menhir/OCamlyacc grammar itself.

@rgrinberg
Copy link
Contributor

Looks good to me. @imbsky feel free to merge once you've tested it.

@smorimoto smorimoto merged commit f356c47 into ocamllabs:master Apr 2, 2020
@smorimoto
Copy link
Collaborator

Thanks @mnxn for your contribution!

@smorimoto smorimoto linked an issue Apr 3, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for OCamlyacc syntax highlighting
3 participants