Web-based MVP of TG-lang with:
- Tokenizer
- Recursive-descent parser (AST)
- Transpiler to JavaScript
- Browser runtime execution
- Simple web IDE
-
Install dependencies: npm install
-
Start dev server: npm run dev
-
Build for production: npm run build
arnesequence -> numeric value (count ofarne)rop arne...-> uppercase ASCII (String.fromCharCode(count + 64))pall-> runtime-generated number where| 1is applied to the integer part and the fractional part is preservedinfodesk exprorinfodesk(expr)->console.log(expr)- Operators:
crew,deltager,kandu,medic - Equality:
kanalseks->=== - Conditional branching:
secbua (condition) { ... }with optionalombud { ... } - Functions:
hylle name(a b) => { ... } - Return:
tech expr - Sleep:
sovetelt(expr) { } - Error:
attentiongrab(expr) - Keyboard input:
kreativia rop arne handlerviakeypress - Program framing:
innsjekk...søndag
The web IDE includes at least two runnable examples:
- Basic output
- Function and sleep
- Error example for validation