Closed as not planned
Description
Because of the changes made to accept for multi-word commands, the parser now greedily takes in as many words as possible to treat as the command. Example to explain better:
Input: list ab
Result: Unknown command
Expected behaviour: An error to user telling that list is recognised, but the format is wrong.
One way to fix this is to refactor AddressBookParser, such that multi-word commands are sent to another secondary parser. Illustrate with examples:
Input: list ab
Sequence: AddressBookParser -> ListCommandParser -> ListCommand
Input: add student
Sequence: AddCommand -> AddStudentCommandParser -> AddStudentCommand
Input: add tutorial
Sequence: AddCommand -> AddTutorialCommandParser -> AddTutorialCommand
Metadata
Assignees
Labels
No labels