-
Notifications
You must be signed in to change notification settings - Fork 20
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
Query about -a
flag
#252
Comments
You're right -- it would seem sensible if the "lex or parse" choice were used further down the line for other commands, but it's not. It's useful to check the lexer output, so I'd want to keep it. It's exposed differently to the rest of the functionality (which is all option-based). I'm not sure what else we can do other than clarify the option as you did, without altering the interface a fair amount. (Mused on this in #177.) Based on personal experience, I find programs that expose their functionality through commands and subcommands are more discoverable than fortran-src's option-based approach. What about an interface like fortran-src typecheck mod1.f mod2.f or closer to existing syntax # --action now takes lex,parse,typecheck,rename,bblocks,...
fortran-src --action typecheck mod1.f mod2.f |
The latter would be very easy to implement and backwards compatible so that might be the best choice. |
The -a flag let's us pass "lex" or "parse" to tell fortran-src what to do:
fortran-src/app/Main.hs
Line 336 in cca921b
But do we want this to be more general (to allow any action?).
I'm not 100% sure why we have this option anyway, but I wonder why its so specific.
The text was updated successfully, but these errors were encountered: