Syntax definitions for highlighter extensions and other tools that display the Architect file format
npm i && npm run buildThis generates and writes versions to be consumed by Atom, Sublime Text, VS Code, and Highlight.js:
- JSON format - Used by Atom + VS Code
- PLIST format - Used by Sublime Text
- Highlight.js - CJS module used by Highlight.js
Should any additional variations need to be built, create them here and pull them in as dependencies of the text editor extension in question.
- The TextMate + Oniguruma grammar system does not enable conditional patterns, or expressions that can change state by matching across multiple lines
- This poses some unique challenges for the Architect format, which is quite minimal, and uses significant whitespace
- Additionally, due to the way this system captures, liberal use of regex lookarounds is necessary to capture certain patterns in specific circumstances (e.g. inline arrays) without introducing weirdness or overlapping in capture groups
- Atom makes use of TextMate Grammars in both
csonandjsonformats, but its settings file must be acsonfile in thesettingsdir (e.g.settings/arc.cson) - Sublime's language file must be
*.tmLanguage, its settings must be*.tmPreferences, and both must be authored inPLIST - VS Code accepts TextMate in
json(with another preferencesjsonfile pointed to bypackage.json)
- The TextMate spec
- Guide to writing a language grammar (TextMate) in Atom, by @Aerijo
- Writing a TextMate Grammar: Some Lessons Learned, by Matt Neuburg
- Annotated TextMate grammar boilerplate by @DamnedScholar
- Atom: TextMate grammar examples
- Oniguruma regex syntax spec
- Atom: Creating a Legacy TextMate Grammar
- Highlight.js language definition guide
