Bracket Language (BL) Extension for Visual Studio Code

This is the official Visual Studio Code extension providing robust Syntax Highlighting for the Bracket Language (BL), created by Kamil Malicki.
The Bracket Language is a simple, bracket-based programming language, focused on clear structure and functional paradigms.
✨ Features
This extension ensures an optimal coding experience in VS Code by accurately tokenizing and coloring all key elements of the Bracket Language syntax:
1. Core Language Constructs (Keywords)
Accurate highlighting for all flow control and definition keywords:
- Definition:
def (variable/function definition)
- Functions:
fun (anonymous function declaration)
- Flow Control:
loop, if, do
2. Built-in Functions
All essential system and utility methods are distinctly highlighted:
- I/O:
print, input
- Manipulation:
len, get, set (for string/list manipulation)
- Conversion/Math:
Number, ord, chr, random
- System Calls:
sys (for executing shell commands)
3. Data Types & Literals
Proper coloring for constants and literals:
- Strings: Double-quoted strings (e.g.,
"Hello World")
- Numbers: Integers and floating-point literals (e.g.,
8, 10, 20)
- Booleans:
true, false
- Comments: Support for line comments starting with a semicolon (
;) or double-slash (//).
- Special Syntax: Recognition of the unique
[number]'[string] syntax (used for slicing/indexing).
💻 Syntax Examples
See the quality of the syntax highlighting in action with real-world Bracket Language code:
Example 1: Function Definition and Cryptography (from cezar_encrypt.bl)
This demonstrates coloring of def, fun, built-in functions (ord, chr), and variable names:
(def szyfruj_znak (fun (znak przesuniecie)
(do
(def kod_znaku (ord znak)) ;Built-in function: ord
(def nowy_kod (kod_znaku + przesuniecie))
(chr nowy_kod) ;Built-in function: chr
)
))
(print "--- Caesar Cipher ---")
(def klucz (Number (input))) ;Built-in functions: Number, input
Example 2: Control Flow and String Manipulation (from SetterGetterILen.bl)
Highlighting of loop, if, string manipulation functions (len, get, set), and numeric constants:
(def my_string "Hello World")
(def len_string (len my_string)) ;Built-in function: len
(def i 0)
(loop (i < len_string) ;Keyword: loop
(do
(def start_char (get my_string i)) ;Built-in function: get
(set my_string i start_char) ;Built-in function: set
(def i (i + 1))
)
)
🛠️ Installation
- Open Visual Studio Code.
- Navigate to the Extensions view (Ctrl+Shift+X or ⌘+⇧+X).
- Search for "BracketLanguage" (or
KamilMalicki.bracketlanguage).
- Click Install.
This extension is maintained by Kamil Malicki.
If you have any suggestions, bug reports, or encounter issues with syntax highlighting:
Thank you for supporting the Bracket Language!