This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/thingsdb/test.ti
Georg Brandl 56c93eac0e
Added ThingsDB Language support (#1295)
* Added ThingsDB Language support

* Update ThingsDB language

* add comments to syntax

* Update to new test system.

Co-authored-by: Jeroen van der Heijden <joente@gmail.com>
Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
2021-03-14 11:20:03 +01:00

76 lines
749 B
Text

/*
* Multi-line comment
*/
// Single line comment
[
0b110 & 0b011,
0b110 | 0b011,
0b110 ^ 0b011,
];
x = 0;
[
false && x += 1,
true || x += 1,
x
]; // expression x += 1 will never be executed
0b101010;
0xff;
+0.314e+1;
nan;
-inf;
inf;
42;
-10;
!false;
true;
false;
nil; // nil
/.*test/i;
'single quote string';
"double quote string";
nodes_info();
id();
.id();
.add(#12, #42);
variable;
.property;
|x, y| x + y;
{
nil; // block
}
.users.map(|user| {
// property, with function and closure
user.name;
});
x.y.z.filter(|| true);
.iris = {
name: 'Iris',
age: 6,
};
.arr = [1, 2, 3];
cato = {}
x = {
6 * 7; /* yes, 42 ! */
};
a == b;
a += 1;
bool = (a == b || (a == c && c != d));