Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TSL Syntax HighlighterNew to Visual Studio Code? Get it now.
TSL Syntax Highlighter

TSL Syntax Highlighter

Christian Scaff

|
2 installs
| (0) | Free
Gives users basic syntax highlighting for their TSL specification files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TSL Syntax Highlighter

This extension allows users to add basic syntax highlighting to their TSL (.tsl, .tslmt) files!

Features

This extension utilizes a TextMate Grammar to tokenize and highlight a TSL specification files.

The grammar is as follows:

start := comment | keyword | operator | constant | identifier | string
comment := commentLine | commentBlock
commentLine := "^\/\/.*$"
commentBlock := "/*" commentBlock "*/"
keyword := control | operator | other
control := "\b(A|F|G|H|O|R|S|T|U|W|X|Y|otherwise|_)\b"
operator := "\b(AND|CAP|CUP|DIV|ELEM|EQ|EQUIV|GE|GEQ|IMPLIES|IN|LE|LEQ|MAX|MIN|MINUS|MOD|MUL|NEQ|NOT|OR|PLUS|PROD|SETMINUS|SIZE|SUM)\b"
other := "\b(import|as|initially|always|assume|guarantee|after)\b"
op := "[!&|\-<=\/\+\*%\(:~,\.\[][!&|<\->=\/\\\[\+\*%\(\):~,\]]*"
constant := bool | digit
bool := "\b(true|false)\b"
digit := "[1-9][0-9]*"
identifier := "[A-Za-z_@][A-Za-z_@'.]*"
string := '"' stringBlock '"'
commentBlock := (NOT */)*
stringBlock := (NOT ")*

Usage

To enable the highlighter, select the Language Mode toggle in the lower right corner of the window and search for TSL.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft