A Visual Studio Code extension that adds syntax highlighting for the ddeLang programming language.
- Syntax highlighting for:
- Numbers (integers and decimals)
- Strings (single and double quoted)
- Booleans (
true,false) - Identifiers
- Control keywords (
if,elseif,else,return, ...) - Operators (
+,-,*,/,=) - Comparators (
==,!=,<=,>=,<,>) - Commas and semicolons
- Brackets (
{},()) - Others
ddeLang is a simple, custom programming language with a syntax inspired by JavaScript, but cleaner and more lightweight.
It is currently a work in progress, but more features will be added soon.
x = random(1, 10);
print('The value of x is', x, "and it's of type", typeof(x));
y = 'Hello ' + ' World!';
print(y, '|', typeof(y));
print({ a = 1; b = 2; a + b; } + { 5 * 5 });
Use # for single-line comments.
# This is a comment
x = 5;
name = "Hello";
isOn = true;
- Numbers:
42,3.14 - Strings:
"text"or'text' - Booleans:
true,false - Null:
null
- Math:
+,-,*,/ - Comparison:
==,!=,<,>,<=,>= - Assignment:
=
add = (a, b) {
return a + b;
};
result = add(2, 3);
if (x > 0) {
result = "positive";
} elseif (x < 0) {
result = "negative";
} else {
result = "zero";
}
for (item, index) in list {
print(item);
}
{
a = 1;
b = a + 2;
}
value = arr[0];
name = user.name;
result = user.getName();
Semicolons ; are optional but supported for separating expressions.
if,else,elseiffor,inreturnnull
Files ending in .dde will automatically be recognized and highlighted as ddeLang.
- Install the extension from the VS Code Marketplace.
- Open a
.ddefile to seeddeLangin action.
- Clone
ddeLang's repository. - Open the folder in VS Code.
- Press
F5to launch a new VS Code window with the extension enabled. - Open a
.ddefile to seeddeLangin action.
Want to improve or expand ddeLang support? PRs and issues are always welcome.
MIT