Skip to content

Change internal representation of commands into an enum #538

Description

@dspinellis

Rather than storing inside Command the command's character as code, represent each command as an enum.

So the existing:

pub struct Command {
    pub code: char,                         // Command code
    pub addr1: Option<Address>,             // Start address

will become

// Sed commands derived from single-character command codes
pub enum Command {
    Append,  // a
    Branch,  // b
    Change,  // c
    // …
}

pub struct CommandDetails {
    pub command: Command,                   // Command to perform
    pub addr1: Option<Address>,             // Start address

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions