dansanderson / picotool

Tools and Python libraries for manipulating Pico-8 game files. http://www.lexaloffle.com/pico-8.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support "?" short-print statements

dansanderson opened this issue · comments

Pico-8 has another preprocessor macro that treats

? x,y,z

as

print(x,y,z)

As with short-if, this requires that the statement be on its own line. Short-print is mostly intended for use at the command prompt, but some carts use it in cart code because it's one token shorter than print with parens, and fewer chars.

For completeness, maybe Picotool should attempt to support this. I probably wouldn't want to do this unless I remove short-if from the grammar and more properly treat both macros as actual preprocessing steps--taking extra care to flag the AST so it dumps the original short-form statement.

So is e4b402c fixing it?

Looks like it. :) Let me know if it doesn't.