Skip to content

Implement a better version of eval + more fancy commands

Dominic Kempf requested to merge feature/sophisticated-eval-command into master

I had a good use case for eval and implemented a far better version of it.

Keys can now depend on the result of eval with curly brackets (in arbitrary ways).

See the following example:

x = 1, 2 | expand
y = {x}*{x} | eval
z = {y}
a = {z} + 1 | eval
b = {a}

While at it, I implemented more commands.

This will result in x=1:

x = 1.235 | toint

Something like pythons " ".join([...]):

dim = 2, 3 | expand
domain = 1.0 | repeat {dim}

Merge request reports

Loading