Timetide Language Support
Syntax highlighting and language support for the Timetide Domain Specific Language (DSL) in Visual Studio Code.
Features
- Syntax Highlighting: Full syntax highlighting for Timetide DSL keywords, functions, types, and constructs
- Comment Support: Both single-line and multi-line (
/* */ ) comments
- Bracket Matching: Automatic bracket, parentheses, and brace matching
- Auto-Closing Pairs: Automatic closing of brackets, quotes, and parentheses
- Code Folding: Support for folding code blocks and regions
- Smart Indentation: Intelligent indentation based on language structure
Supported File Extensions
Language Features
The extension provides highlighting for:
Keywords
- Control Flow:
for , abort , if , else , while , do , break , continue , return , toplevel
- I/O Operations:
input , output , channel , delay , task , send , run
- Task Parameters:
period , duration , offset
- Logical Operators:
and , or , not , || , && , !
Data Types
int , float , bool , void , char
Special Constructs
- Channels: Uppercase identifiers (e.g.,
WASHING , Wash_on )
- Functions: Function definitions and calls
- Task Blocks: Special highlighting for
task() constructs
- Comments: Both single-line and block comments
Example Code
/* Washing machine control system */
wash_cycle(input int wash_on, input int wash_off,
output int WASHING)
{
for (int i : 0 : 99)
{
abort(wash_on)
{
task(period = 1, duration = 0, offset = 0) { ; }
}
abort(wash_off)
{
task(period = 1, duration = 0, offset = 0)
{
send WASHING(1);
}
}
}
};
toplevel()
{
int channel Washing delay 1;
int channel Wash_on delay 3;
{
run wash_cycle(Wash_on, Wash_off, Washing);
}
};
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Timetide Language Support"
- Click Install
From VSIX File
- Download the
.vsix file
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded
.vsix file
Usage
- Create a new file with
.tt or .timetide extension
- Start writing Timetide code
- Enjoy syntax highlighting and language features!
Configuration
The extension works out of the box with no additional configuration required. However, you can customize syntax highlighting colors through VS Code's theme settings.
Known Issues
- Currently focused on syntax highlighting; IntelliSense and error checking are not yet implemented
- Some edge cases in complex nested structures may not highlight perfectly
Contributing
Found a bug or want to contribute? Please visit our GitHub repository to:
- Report issues
- Submit feature requests
- Contribute code improvements
Release Notes
0.3.1
- Initial release
- Basic syntax highlighting for Timetide DSL
- Support for comments, keywords, functions, and types
- Bracket matching and auto-closing pairs
- Code folding support
License
This extension is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- Thanks to the Timetide DSL development team
- Built with VS Code's language extension framework
| |