Skip to content

Fix printing for Operand object #20

@Cyerunix

Description

@Cyerunix

When an Operand object is printed, if the name contains quotation marks, those marks are not printed (e.g. "hello" creates Operand("hello") which, when printed, appears as hello). This becomes a problem when the empty string ("") shows up as an operand, as nothing is printed. When such an operand (Operand("")) is contained as part of another object, such as CommandInvocationInitial, it will appear as though, when printed, the CommandInvocationInitial object does not actually contain an Operand("") when, in reality, it does. This is quite deceptive and could easily lead to annoying issues that are difficult to debug (in this case, the only way to tell that there is an Operand("") is to check the length of the CommandInvocationInitial object's operand list, which is not intuitive). My proposition would be to forcefully include quotation marks around every operand that is printed to ensure that it is always clear that they exist or to provide some clear indicator that any Operand("") instances are present such as some kind of keyword.

See #19 for more details on the issue.

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