Language support for TokenVector (.tkv, .tv) — a Python-like, ahead-of-time compiler that emits .NET CIL and runs as a native Windows executable.
Features
Syntax highlighting for the full .tkv grammar: keywords, primitive and container type annotations ("i32", "list[f64]"), strings, f-strings, numbers, decorators, dunder names and native builtins.
Smart editing: auto-indent after : blocks, outdent on elif / else / except / finally / case, bracket and quote pairing, # line comments.
Snippets for def, class, record, if, for, while, try, with, print, list comprehensions, typed variables, __tkv_extern_assembly__ and simd_gemm.
Build and Run commands with a dedicated output channel.
Requirements
The build commands need the TokenVector compiler, tkvc-tv.exe. The extension looks for it in this order:
The tokenvector.compilerPath setting.
<workspace>/Release/dist/tkvc-tv.exe.
<workspace>/dist/tkvc-tv.exe.
tkvc-tv.exe on your PATH.
Syntax highlighting and snippets work without the compiler.
Usage
Open any .tkv file and use the Command Palette (Ctrl+Shift+P):
TokenVector: Build Current File — compiles file.tkv to file.exe next to the source.
TokenVector: Build and Run Current File — compiles, then runs the executable in an integrated terminal.
Both commands are also available in the editor context menu.
def main() -> "i32":
print("hello from TokenVector")
return 0