Zezombye / overpy

High-level language for the Overwatch Workshop with support for compilation and decompilation.
GNU General Public License v3.0
175 stars 25 forks source link

Allow f strings #354

Open TheBlueMoonEclipse opened 6 months ago

TheBlueMoonEclipse commented 6 months ago

Add f strings so we can make code easier like so:

(mind you the 'print' action is the macro) rule 'pizza': print('hello {}'}.format('world') ^ hard

rule 'pizza': print(f'hello {'world'}') ^ easy

CactusPuppy commented 6 months ago

Zezombye has commented on Discord that it would be difficult to tokenize format strings. As of right now I lack the bandwidth to tackle this issue, but I agree it would be very nice to have.

nathan130200 commented 5 months ago

Maybe using some libraries like Antlr (a bit slow) or GNU Bison (faster), but writing grammars/parsers are painful 💀💀