MyLang — VS Code Extension
Rich syntax highlighting for the MyLang programming language (.my files).
Features
🎨 Full Syntax Highlighting for all MyLang constructs:
- Keywords —
let, print, if, while, for, in, func, return, import
- ML/AI Keywords —
model, endmodel, train, with, predict
- Collection Operations —
push, pop
- Built-in Functions —
sqrt, log, exp, sin, cos, sum, mean, len, tensor, dot, matmul, load
- Constants —
true, false, null
- Strings —
"Hello World" with escape character support
- Numbers — integers and floats
- Comments —
# single line comments
- Operators —
+ - * / % ^, = =! > < >= <=, .. (range), and or not
- Function & Model definitions — highlighted with distinct colors
📝 Editor Support:
- Comment toggling (
Ctrl+/)
- Auto-closing brackets and quotes
- Indentation-based code folding
- Smart indentation for block-starting keywords
Example
# Variables
let name = "Abdullah"
print name
# Functions
func greet name
print "Hello " + name
greet "Ali"
# Loops
for i in 0..5
print i
# ML Model
model myNet
dense 128 relu
dense 10 softmax
endmodel
train myNet with data epochs 50 lr 0.001
File Extension
This extension activates for files with the .my extension.
Installation
- Download the
.vsix file
- Open VS Code
- Press
Ctrl+Shift+P → "Extensions: Install from VSIX..."
- Select the
.vsix file
- Reload VS Code
Requirements
- VS Code 1.125.0 or higher
| |