Skip to content

Conversation

@KevinRansom
Copy link
Contributor

@psfinaki, @vzarytovskii - hey here is a very minor tweak, although it also includes an opportunistic name change of some local variables.

The basic idea is to split the option 's' into:

  1. option minus the switch chars '/', '-' or '--'
  2. the token, option minus the switch chars and the ':' and arguments
  3. the arguments, that which follows the ':'

Then add a handler :
| CompilerOption (s, _, OptionConsoleOnly f, d, _) :: _ when option = s ->
reportDeprecatedOption d
f blocks
t

So when the handlers see the fully specified option: langversion:? it handles it (show the langversion options), otherwise it falls through to the OptionUnit version which handles setting the value.

If you like this approach just add this code to your PR or perhaps do something else similar, fix the text and tests and tidy up the code :-)

Kevin

@psfinaki
Copy link
Contributor

psfinaki commented Sep 9, 2022

So I eventually incorporated these changes to the original PR

@KevinRansom KevinRansom deleted the investigate branch October 12, 2022 20:41
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

Successfully merging this pull request may close these issues.

2 participants