SwagColoredKitteh / shiny-pancake

A renderer that takes commands from standard input. Though, it turned more into a kind of replay viewer.
GNU General Public License v3.0
6 stars 1 forks source link

Macro support #12

Open MarcosCosmos opened 7 years ago

MarcosCosmos commented 7 years ago

Just simple (static) regex-replace c-style macros to /allow/ complex shapes to be drawn simply.

This would mainly be useful for allowing us to do something like share any more complex shapes we might want (e.g. map bounds) between each other as downloadables without having to muck around too much.

This aligns well with #8 if we turn meta-data into variable settting e.g. #CALL WIZARD $y $y.

macros and variables should be strictly single layer only for the case of enforcing simplicity, so no nesting (can't macro a macro or reference another variable).

SwagColoredKitteh commented 7 years ago

Yeah, macros would be very nice, I'm guessing we could implement it with these commands (feel free to suggest new names):

This plus when reading the argument list, if a '$' is found as the first character, assume it's a variable and replace.

For now, no nested macros.