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 C3 language support #7148

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vkuprin
Copy link

@vkuprin vkuprin commented Dec 4, 2024

Description

Adding support for the C3 programming language - a modern systems programming language building on C's foundation. C3 enhances C with features like modules, better error handling, generics, and contracts while maintaining C's performance characteristics.

Checklist:

The C3 language (https://c3-lang.org/) is a modern systems programming language designed to be a better C. This PR adds support for recognizing and highlighting C3 source files on GitHub.

Features demonstrated in the sample:

  • Module system
  • Enums and structs
  • Error handling with faults
  • Function contracts
  • Defer statements
  • Modern control structures

Signed-off-by: Vitaly Kuprin <[email protected]>
@vkuprin vkuprin changed the title feat: add c3 support Add C3 language support Dec 4, 2024
@vkuprin vkuprin marked this pull request as ready for review December 4, 2024 21:54
@vkuprin vkuprin requested a review from a team as a code owner December 4, 2024 21:54
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

You have not followed the instructions for adding a language as detailed in the CONTRIBUTING.md file. Please do so.

@vkuprin vkuprin marked this pull request as draft December 9, 2024 18:51
@vkuprin
Copy link
Author

vkuprin commented Dec 9, 2024

I see that Linguist only supports TextMate-compatible grammars. If anyone has suggestions or tools that could assist with this process, I’d greatly appreciate the input

@kinnyugen
Copy link
Contributor

If anyone has suggestions or tools that could assist with this process, I’d greatly appreciate the input

Chances are you could steal C's textmate grammar, or just fork the c.tmbundle repository and adapt it a little to C3's syntax. https://github.com/textmate/c.tmbundle

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.

3 participants