Skip to content

Add 010 Editor Binary Template language - #8154

Open
rm-NoobInCoding wants to merge 1 commit into
github-linguist:mainfrom
rm-NoobInCoding:add-010-editor-binary-template
Open

Add 010 Editor Binary Template language#8154
rm-NoobInCoding wants to merge 1 commit into
github-linguist:mainfrom
rm-NoobInCoding:add-010-editor-binary-template

Conversation

@rm-NoobInCoding

@rm-NoobInCoding rm-NoobInCoding commented Aug 28, 2026

Copy link
Copy Markdown

Adds support for 010 Editor Binary Templates (*.bt).

Description

010 Editor Binary Templates describe the layout of a binary file format using a C-like syntax: struct / typedef struct, enum, functions, the usual control flow and preprocessor directives, plus template-specific types (ubyte, uint32, int64, wstring, …), variable attributes (<name=…, format=hex, read=…, optimize=false>) and built-ins (FSeek, FTell, LittleEndian, Printf). 010 Editor executes a template against a file in order to parse and annotate it, so it is classified as programming rather than data.

.bt is not currently claimed by any other entry in languages.yml, so no heuristic is required.

On the grammar: I was unable to find a TextMate, Sublime or VS Code grammar for this language anywhere — the source.bt grammars that exist on GitHub are for unrelated languages (the bt-lang project and various behaviour-tree DSLs). tm_scope is therefore set to source.c, following the existing precedent of B, DTrace, OpenCL, Pro*C, RPC, Unified Parallel C, X BitMap, X PixMap and XS. Because the template syntax is largely a superset of C this highlights well in practice. Happy to change it to tm_scope: none if you would prefer.

On .1sc: 010 Editor scripts (*.1sc) use the same language, but I have deliberately left that extension out as it does not meet the usage requirements (~400 files indexed).

Checklist:

010 Editor Binary Templates (*.bt) describe binary file formats using a
C-like syntax and are run by SweetScape 010 Editor to parse and annotate
binary files.

No TextMate grammar exists for the language, so reuse the C grammar for
highlighting; the template syntax is largely a superset of C.

Samples are real-world templates from
three-houses-research-team/010-binary-templates (MIT).
@rm-NoobInCoding
rm-NoobInCoding marked this pull request as ready for review August 28, 2026 15:16
@rm-NoobInCoding
rm-NoobInCoding requested a review from a team as a code owner August 28, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant