What is Nostr?
Koning Van Worcester 👑️ /
npub1kgq…09pk
2024-05-07 18:54:39

Koning Van Worcester 👑️ on Nostr: A glass of 🍷️ and an hour later, I implemented alias expressions in my compiler ...

A glass of 🍷️ and an hour later, I implemented alias expressions in my compiler :)

For example:

```
alias expr = 1+1;

int main()
{
int i = expr;
return i;
}
```

And running `./tlang.out; echo $?` you get `2` as expected.

---

The MetaProcessor searches for all VariableExpression(s) (which `expr` would be in `int i = expr;`) and then clones the alias's expression and replaces the AST node with a clone of itself.
Author Public Key
npub1kgqpykvj4dln4ujd0n0u97ldpdfs4ncl30vmd3aaxlt8vzntp98qew09pk