rascal icon indicating copy to clipboard operation
rascal copied to clipboard

keyword fields with dashes not escaped by standard text writer

Open jurgenvinju opened this issue 2 years ago • 0 comments

Describe the bug

rascal>data X = \hello-bye();
ok
rascal>\hello-bye()
X: \hello-bye()
rascal>data X(int \what-if=0);
ok
rascal>\hello-bye(\what-if=1)
X: \hello-bye(what-if=1)

Here we see \hello-bye is escaped as it should be, but what-if is not escaped. Copy-pasting this example print leads to a parse error immediately because of this.

jurgenvinju avatar Mar 30 '23 09:03 jurgenvinju