0x1DE 0.5.0 is available
0x1DE 0.5.0 is available — the VS Code and VSCodium extension for the Spectrum-family languages. Highlighting is now generated from a language surface: one file per language enumerating its words, literals, comments and blocks, so a word added in one place reaches every editor at once.
Breaking
- A query naming
statement_nameno longer compiles. It isstatement_definitionat column 0 andstatement_invocationwhen indented. Name whichever the query means, or both. - A
STRUCTmember is astruct_member, not a statement. A query reaching members throughstatement_definitionfinds none; they carrymember_nameand eithermember_sizeormember_type. - The release no longer attaches
grammar.js,highlights.scmandtree-sitter-fantasm.wasmas loose files. Each language ships as one<language>-grammar.zip, holding itsgrammar.js, every query, the generatedsrc/and the parser wasm. Take the archive.
Added
- Two new languages. A Boriel ZX BASIC grammar — typed declarations, functions and subs, all six block forms, nesting
/'comments, every numeric radix,a$andn%sigils. And a PASTA/80 grammar — the four declaration sections, records, arrays and pointers, all three comment forms,ABSOLUTEplacement,#65character constants. - FantASM 2.0.0’s
alignandwatch, and!virtual … endvirtualblocks. npm run checkfails when a generated file no longer matches its surface, naming the file and the first differing line. It runs in CI.injections.scmandoutline.scmare published, inside the grammar archives.
Fixed
Colour lost from the line that caused it, and everything after it:
!nex version V1.3broke the parse of its own line, taking the rest of the file’s colours and the outline’s enclosing block with it.#if,assert,assert_checksum,device,debugandinit_cycle_limitread as parse errors or macro invocations, and a local label written.loop:read as one too.
Coloured wrongly:
- A register was read inside a number —
0x2Awas not a number, and itsacoloured as a register.$FFread as the program counter followed by a name. - A
STRUCTmember named after a directive coloured backwards, the name as a keyword and its size as an operand; a member whose size is another struct coloured as an operand rather than a type. - Rhai’s 21 reserved symbols —
===,!==,->,++,...among them — read as ordinary operators, soa ++ blooked like two unary pluses. "a""b"read as two strings. A doubled delimiter inside a Rhai literal is a literal one.- Macro invocations and
STRUCTinstances were listed in the outline as though they were labels.
.s and .fasm are no longer claimed as FantASM by an editor loading the grammar directly, such as Neovim or Helix. .s is the GNU assembler’s; FantASM is .asm and .inc.
This site’s own code samples use these grammars — the FantASM and Rhai blocks throughout the FantASM documentation and the Bizmuth scripting guide are coloured by the same files the editor loads.
Get it from the Downloads page, or from Open VSX.