Grunt Language for VS Code
Syntax highlighting and editor support for the Grunt programming language.
Features
- Syntax highlighting for
.grunt files
- Comment toggling (
Ctrl+/ / Cmd+/)
- Bracket matching and auto-closing
- Code folding
Installation
From Source (Development)
Clone the repository and navigate to the extension directory:
cd packages/grunt-vscode
Install as a local extension by creating a symlink:
# Linux/macOS
ln -s "$(pwd)" ~/.vscode/extensions/grunt-lang
# Or copy the directory
cp -r . ~/.vscode/extensions/grunt-lang
Restart VS Code
Development Mode
- Open the
packages/grunt-vscode folder in VS Code
- Press
F5 to launch the Extension Development Host
- Open a
.grunt file to see syntax highlighting
Supported Syntax
Keywords
pub, fn, let, case, import, use, where, if, else, type, mut
Built-in Types
Tensor, Vec, Gpu, Nil
Scalar Types
i8, i16, i32, i64, u8, u16, u32, u64, f16, bf16, f32, f64, bool
Literals
- Integers:
123, 0xFF, 0b1010, 0o777, with optional suffixes (123i32)
- Floats:
1.0, 1e10, 1.5e-3f32
- Strings:
"hello"
- Booleans:
true, false
- Hole placeholder:
...
Operators
- Pipe:
|>
- Arrows:
->, =>
- Comparison:
==, !=, <, <=, >, >=
- Logical:
&&, ||, !
- Arithmetic:
+, -, *, /, %
Example
import std/tensor
import std/gpu
pub fn model(x: Tensor(bf16,[b,d]), w: Tensor(bf16,[d,h])) -> Tensor(bf16,[b,h]) {
x |> matmul(w) |> gelu
}
pub fn main() -> Gpu(Nil) {
use s = gpu.stream()
let x = ...
Ok(Nil)
}
License
MIT
| |