elikaski / BF-it

A C-like language to Brainfuck compiler, written in Python
MIT License
121 stars 11 forks source link

Add simple code minifications #6

Closed NeeEoo closed 4 years ago

NeeEoo commented 4 years ago

Removes ><, <>, +- and -+ from the compiled code.

NeeEoo commented 4 years ago

The minification could maybe be enabled by a command argument flag.

elikaski commented 4 years ago

Great feature, thanks! I reviewed your code and it looks good

The minification could maybe be enabled by a command argument flag.

I agree Would you like to add it or should I just merge?

NeeEoo commented 4 years ago

Any idea what letter the command argument should be. -O for optimize, -p for production, -m for minify, or something else.

elikaski commented 4 years ago

I think -m is best

NeeEoo commented 4 years ago

Uses -m and --minify to enable minification.