btwael / mammouth

Unfancy PHP
http://mammouth.boutglay.com
MIT License
214 stars 22 forks source link

Why don't compiler keep the comments? #63

Open webarthur opened 8 years ago

webarthur commented 8 years ago

In coffeescript/javascript there is a browser/internet issues but in php dont. I think is better to keep the comments because in a team if someone don't knows mammouth and want understand code or do changes directly in php file this guy will not get confused.

Maybe breaklines could be keeped too.

webarthur commented 8 years ago

A good example: I'm refactoring my wp plugin and I need to keep the comments to WordPress reconize plugin attributes.

<?php / Plugin Name: Advanced Settings Plugin URI: http://araujo.cc/wordpress/advanced-settings/ Description: Get advanced settings and change all you imagine that are not provided by WordPress. Author: Arthur Araújo Author URI: http://araujo.cc Version: 2.2.2 /

....

loopdotcoop commented 8 years ago

I’d love this feature for block comments, as in CoffeeScript: http://stackoverflow.com/a/9724433

brucedickey commented 8 years ago

Agreeing with webarthur -- for debugging the generated PHP, it would be really nice to have Mammouth command line options to keep comments and keep whitespace. Of course, these would not be used for generating files for production. Thanks.