Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing for Operand object #20

Open
Cyerunix opened this issue Jul 26, 2024 · 0 comments
Open

Fix printing for Operand object #20

Cyerunix opened this issue Jul 26, 2024 · 0 comments

Comments

@Cyerunix
Copy link
Contributor

Cyerunix commented Jul 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant