Cherry Language VSCode Extension
This extension provides syntax highlighting for the Cherry programming language.
Features
- Syntax highlighting for Cherry language files (
.cherry )
- Support for hashtag line comments (
# )
- Highlighting for:
- Keywords (
var , func , if , while , etc.)
- Function declarations (including compile-time functions with
! )
- Types (
number , string , boolean , etc.)
- Strings and numbers
- Operators and punctuation
- Comments
Installation
Copy this extension to your VSCode extensions directory:
- Windows:
%USERPROFILE%\.vscode\extensions\cherry-language-1.0.0
- macOS:
~/.vscode/extensions/cherry-language-1.0.0
- Linux:
~/.vscode/extensions/cherry-language-1.0.0
Reload VSCode
Open a .cherry file to see syntax highlighting
Cherry Language Features
# This is a line comment
var x = 5; # End-of-line comment
Functions
# Regular function
func greet(name: string): string {
return "Hello, " + name;
}
# Compile-time function
func generateCode!(count: number) {
var! i = 0;
while!(i < count) {
print("Generated: " + i);
i = i + 1;
}
}
Variables
var regularVar = 10; # Runtime variable
var! compileTimeVar = 5; # Compile-time variable
Repository
https://github.com/cherry-lang/cherry-language-vscode
| |