Skip to content

architect/syntaxes

Repository files navigation

Syntax definitions for highlighter extensions and other tools that display the Architect file format

Build the syntax definitions

npm i && npm run build

This generates and writes versions to be consumed by Atom, Sublime Text, VS Code, and 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.

Notes / caveats

  • 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 cson and json formats, but its settings file must be a cson file in the settings dir (e.g. settings/arc.cson)
  • Sublime's language file must be *.tmLanguage, its settings must be *.tmPreferences, and both must be authored in PLIST
  • VS Code accepts TextMate in json (with another preferences json file pointed to by package.json)

Resources

Building TextMate grammars

About

Syntax definitions for highlighter extensions and other tools that display the Architect file format

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors