Generalise no_arg_parser in command_parser in CLI #173

Open
opened 2020-08-06 16:56:09 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:09 +00:00 (Migrated from github.com)

Currently each command that takes no args has it's own separate parser. This ought to be able to be generalised. My idea was:

  • Amend no_arg_parser to take a command
  • Move the keyword matching and map from specific parser to no_arg_parser
  • Use command type to determine which keywords should be matched for this command type
  • return that command type inside the map.
  • Use no_arg_parser inside choice instead of close_parser, exit_parser and schema_parser.
Currently each command that takes no args has it's own separate parser. This ought to be able to be generalised. My idea was: * Amend `no_arg_parser` to take a command * Move the keyword matching and map from specific parser to `no_arg_parser` * Use command type to determine which keywords should be matched for this command type * return that command type inside the map. * Use `no_arg_parser` inside `choice` instead of `close_parser`, `exit_parser` and `schema_parser`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#173
No description provided.