static syntax highlighting WIP

This commit is contained in:
りき萌 2024-03-10 23:23:50 +01:00
parent 7fd2d18b69
commit 5ab8ffdba2
12 changed files with 523 additions and 63 deletions

View file

@ -0,0 +1,36 @@
%% title = "syntax highlighting gallery"
- this is a page demonstrating syntaxes supported by the treehouse
- really there's not much more to it, but I use it for debugging + with it you can get a general feel for how I highlight things in the treehouse
- `javascript`
```javascript
// t is an existing tile index; variable name is short for brevity
export function removeRedundancies(t) {
if (isSet(t, SE) && (!isSet(t, S) || !isSet(t, E))) {
t &= ~SE;
}
if (isSet(t, SW) && (!isSet(t, S) || !isSet(t, W))) {
t &= ~SW;
}
if (isSet(t, NW) && (!isSet(t, N) || !isSet(t, W))) {
t &= ~NW;
}
if (isSet(t, NE) && (!isSet(t, N) || !isSet(t, E))) {
t &= ~NE;
}
return t;
}
/* This is
a multiline comment. */
ident Class CONSTANT funciton()
0b1010 0o01234567 0x0123456789ABCDEF
01234567
1.41e-3
'string' /**/ "string" /**/ `string`
+ - * / == != <= >= ! ~ || && . ? :
, ;
```