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

GH-316: Enable Specifying Target without Switch #317

Conversation

RichiCoder1
Copy link
Contributor

Fixes #316: Allow accepting Target as a positional parameter as well as a switch.
Also rewrites the argument parser slightly to process all arguments,
appending positions, and then process them.

Allow accepting Target as a positional parameter as well as a switch.
Also rewrites the argument parser slightly to process all arguments,
appending positions, and then process them.
@patriksvensson
Copy link
Member

Sorry for not responding to this until now. Will take a look at it today 😄

@@ -0,0 +1,20 @@
namespace Cake.Arguments
{
internal struct Argument
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No advantage to use a struct here. Should be a class.

@patriksvensson
Copy link
Member

It seems to do the job, but the argument parser have become kind of complex. This was the case before the change so it's not your fault, but adding more logic to it didn't make it better 😄

I think that most of the logic could be simplified in the future by writing a proper tokenizer, but we can postpone that until later.

Left some minor comments in the code.

/ Patrik

@RichiCoder1
Copy link
Contributor Author

Agreed on proper tokenizer support. This'll have to do in the meantime.

@RichiCoder1
Copy link
Contributor Author

Updated to address PR feedback.

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.

None yet

2 participants