Syntax highlighting for the Kryon programming language.
- Syntax highlighting for
.kryfiles - Support for Kryon keywords, types, and widgets
- Auto-closing brackets and quotes
- Line comments (
//)
use- Import modulesfn- Function declarationvar- Variable declarationref- Reference typenil- Null valuereturn,if,else,for,while
int,real,string,byte,voidref- Reference types (e.g.,ref Image)fn- Function typesarray,list,dict,chan
->- Module access (e.g.,sys->print)@- Pipe/refresh operator (e.g.,drawClock @ 30000)- Standard operators:
+,-,*,/,%,=,==,!=,<,>,<=,>=,&&,||
Window,Label,Button,Entry,Checkbutton,Radiobutton,Listbox,Scale,Frame- Layout:
Column,Row,Center,Canvas
use daytime
use math
var x: int
var name: string = "Hello"
fn add(a: int, b: int): int {
return a + b;
}
fn greet(): string {
sys->print("Hello!\n");
return "World";
}
Window {
title = "My App"
width = 400
height = 300
bg = "#191919"
Center {
Label {
text = "Hello World"
fg = "#ffffff"
}
}
}
-
Copy this folder to your VS Code extensions directory:
- Linux:
~/.vscode/extensions/ - macOS:
~/.vscode/extensions/ - Windows:
%USERPROFILE%\.vscode\extensions\
- Linux:
-
Rename the folder to
kryon-language-0.0.1 -
Restart VS Code
To build and test locally:
npm install
npm run compileMIT