AstraC Language Support for VS Code
Syntax highlighting, snippets, and language configuration for the AstraC compiler and assembler.
Languages
| Language |
File extensions |
Description |
| AC (AstraC) |
.ac, .ah |
C-like systems language for i386/i286 |
| AS (Astra Assembler) |
.as |
NASM-like Intel-syntax assembler |
Features
- AC: full keyword/type/pointer highlighting, preprocessor directives
(
#include, #define, #if/#elif/#else, #push/#pop), numeric
literals (hex/binary/float/char), string escapes, operators, and snippets.
- AS: all 200 instruction mnemonics (full i386 ISA), every register
(GPR/segment/control/debug/FPU/MMX/SSE), section & mode directives
(
.data, .rodata, .code, .use16, .use32, .org, .times), size
overrides (BYTE/WORD/DWORD/REAL4 PTR), local labels (@@, @f,
@b), location counters ($, $$), and snippets.
IntelliSense
The extension ships a language server for AC that provides:
- Completion for globals, functions,
typedef/struct/union/enum
names, and #define macros.
- Hover (type info) and Go to Definition for those symbols.
- Outline (
documentSymbol) of the top-level declarations in a file.
#include directives are resolved transitively, so symbols from any included
file are available everywhere from the point of the #include onward.
Visibility follows AC's storage classes: static (and unqualified file-scope)
globals are visible across files, while local globals stay private to the
file that declares them.
Usage
Install the .vsix package, or run the extension locally in the
Extension Development Host.
To build from source: npm install && npm run compile, then press F5 (or run
vsce package to produce a .vsix).
References
vsce package
| |