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

Adds Monarch Grammar File Generation #620

Merged
merged 7 commits into from
Sep 6, 2022

Conversation

montymxb
Copy link
Contributor

@montymxb montymxb commented Aug 5, 2022

Closes #582 by adding an option to generate a Monarch grammar file. This supplements our existing generation for TextMate grammar files, so we can generate one, both, or neither of them as we choose.

As an example I've updated the statemachine example's langium-config to construct a Monarch grammar, and I've added the resulting file.

Currently I've been comparing the results by using Microsoft's Monarch Editor (playground), and it looks good.

The shows is marked as having quite a few errors in VSCode but the format should be ok when used in a Monaco instance. I haven't tried setting this up directly, but that would be the next step.

@montymxb montymxb marked this pull request as ready for review August 5, 2022 14:30
@montymxb montymxb requested a review from msujew August 5, 2022 14:31
@montymxb montymxb changed the title Adds Monarch Highlighter File Generation Adds Monarch Grammar File Generation Aug 5, 2022
@montymxb
Copy link
Contributor Author

montymxb commented Aug 8, 2022

Thanks for the feedback @msujew . Next commit of changes should be up sometime later tomorrow.

@montymxb
Copy link
Contributor Author

New changes are up 👍

@montymxb montymxb requested a review from msujew August 10, 2022 09:38
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite good. Just a few minor things, see below.

packages/langium-cli/src/generate.ts Outdated Show resolved Hide resolved
examples/statemachine/syntaxes/statemachine.monarch.ts Outdated Show resolved Hide resolved
@montymxb
Copy link
Contributor Author

Last review points added in.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@montymxb montymxb merged commit b70fa18 into main Sep 6, 2022
@montymxb montymxb deleted the montymxb/add-monarch-highlighting branch September 6, 2022 09:47
@spoenemann spoenemann added this to the v0.5.0 milestone Sep 15, 2022
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.

Native Monarch support for Langium
3 participants