Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Need re2c:flags:no-generation-date config option #203

Open
Durimar opened this issue Apr 17, 2018 · 1 comment
Open

Feature request: Need re2c:flags:no-generation-date config option #203

Durimar opened this issue Apr 17, 2018 · 1 comment

Comments

@Durimar
Copy link

Durimar commented Apr 17, 2018

Hello.

I found that for some usefull command line options there is no configuration with re2c : flags : *** API.

--no-generation-date => need re2c:flags:no-generation-date = 1/0;
--no-version => need re2c:flags:no-version = 1/0;

May be some other options (i didn't check all options)

Thanks.

@skvadrik
Copy link
Owner

The reason why these options (and some others) were not added as configurations is because they only make sense for the entire file, not for each particular re2c block. It's not clear what should happen in a case like this:

/*!re2c
    re2c:flags:no-generation-date = 1;
*/
...
/*!re2c
    re2c:flags:no-generation-date = 0;
*/

On one hand, we can say that the latest configuration overrides all the previous ones, and in that case the date must be generated. On the other hand, date logically belongs to the program start, so it makes sense to pick the option from the first re2c block.

Once we agree on the right behavior, implementing the configurations should not be that hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants