Add 010 Editor Binary Template language - #8154
Open
rm-NoobInCoding wants to merge 1 commit into
Open
Conversation
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
marked this pull request as ready for review
August 28, 2026 15:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asprogrammingrather thandata..btis not currently claimed by any other entry inlanguages.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.btgrammars that exist on GitHub are for unrelated languages (thebt-langproject and various behaviour-tree DSLs).tm_scopeis therefore set tosource.c, following the existing precedent ofB,DTrace,OpenCL,Pro*C,RPC,Unified Parallel C,X BitMap,X PixMapandXS. Because the template syntax is largely a superset of C this highlights well in practice. Happy to change it totm_scope: noneif 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:
extension:bt "010 Editor"): 6,784 files, spread across 128 unique repositories in the first 500 results, with the largest single owner accounting for ~7% of them.FSeekreturns 4,056 andLittleEndian3,512. Note that a bareextension:btsearch (23,488) is not a good measure, as.btis also used in the wild by unrelated behaviour-tree andbt-langprojects — hence the keyword-qualified queries above.#ffbe0c