KeKsBoTer / setlx2python

setlX to Python transpiler
2 stars 0 forks source link

support variables in string #12

Closed KeKsBoTer closed 5 years ago

KeKsBoTer commented 5 years ago
x := 'test';
print("value: $x$");

this prints "value: test"

KeKsBoTer commented 5 years ago

This creates some problems. setlx supports expressions in strings e.g. "retult: $x+2*test(x)$" To support expressions in strings the transpiler has du translate the string at runtime, which is not every efficient.

KeKsBoTer commented 5 years ago

Parse the strings with the antlr grammar and use python f-strings

KeKsBoTer commented 5 years ago

fixed 8424111f13c2829fcdb1a8cec20ed4149e530fcf