Open Paul2708 opened 5 years ago
I appreciate your interest in this project. As the command parsing is basically the core of the whole project, it should be refactored. I agree with that. You mentioned in #8 and #16 to add a new argument type that wraps all of the functionalities like:
the type/argument converter, the name, the optionality, and possible other features like custom verifiers or restrictions.
How would you integrate this argument type? And can you describe your idea of parsing in a few sentences?
Okay, I see your point. It would be good to map the command properties (name, optional, etc.) to the actual argument.
But I think CommandArgument
is a good name for what the class is actual doing.
If you want to, you can create a class that holds meta information for an argument in a command. The properties would be set while parsing the command, correct? If it is so, you can go ahead and refactor the command parsing (if you want to of cause).
Description
Sometimes an object contains multiple arguments. E.g.
Location
as it contains three coordinates. It would be nice to have a command argument bundle that bundles multiple arguments into one.Usage
Screenshots or code Something like that: