Skip to content

Switch Carbon language to upstream grammar.#8024

Open
zygoloid wants to merge 3 commits into
github-linguist:mainfrom
zygoloid:carbon-upstream-grammar
Open

Switch Carbon language to upstream grammar.#8024
zygoloid wants to merge 3 commits into
github-linguist:mainfrom
zygoloid:carbon-upstream-grammar

Conversation

@zygoloid

@zygoloid zygoloid commented Jun 17, 2026

Copy link
Copy Markdown

Previously it seemingly used a mixture of Go and V grammars!

Checklist:

Previously it seemingly used a mixture of Go and V grammars!
@zygoloid zygoloid requested a review from a team as a code owner June 17, 2026 18:07

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please follow the instructions for replacing a grammar detailed in the CONTRIBUTING.md file.

@zygoloid zygoloid requested a review from lildude June 18, 2026 23:05
@zygoloid

Copy link
Copy Markdown
Author

Please follow the instructions for replacing a grammar detailed in the CONTRIBUTING.md file.

Done. (I assume you don't actually want vendor/grammars/vscode-vlang removed, since it's still used for V, so I reverted that change that the script made.)

I also fixed up some broken syntax and some other slightly odd things in the Carbon sample code.

@lildude

lildude commented Jun 19, 2026

Copy link
Copy Markdown
Member

I also fixed up some broken syntax and some other slightly odd things in the Carbon sample code.

We generally don't modify samples as they're expected to be correct at the time they were added and help identify older files as a language's syntax evolves. If the language has evolved, it's best to add new samples and leave the old as-is.

@zygoloid

zygoloid commented Jun 19, 2026

Copy link
Copy Markdown
Author

I also fixed up some broken syntax and some other slightly odd things in the Carbon sample code.

We generally don't modify samples as they're expected to be correct at the time they were added and help identify older files as a language's syntax evolves. If the language has evolved, it's best to add new samples and leave the old as-is.

These samples were never correct. (But nor was using the V syntax highlighter or the Go syntax highligher to highlight Carbon. This language was set up pretty strangely.)

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.

2 participants