rascal icon indicating copy to clipboard operation
rascal copied to clipboard

TutorCommandExecutor crashed on empty lines

Open jurgenvinju opened this issue 7 months ago • 0 comments

This is an example:

```rascal-shell
import lang::csv::IO;
rel[int position, str artist, str title, int year] R1 = {
  <1,"Eagles","Hotel California",1977>,
  <2,"Queen","Bohemian rhapsody",1975>,
  <3,"Boudewijn de Groot","Avond",1997>
};
// we can write the CSV with a header row:
writeCSV(#rel[int position, str artist, str title, int year], R1, |tmp:///ex1a.csv|);

// or write it without the header row:
writeCSV(#rel[int, str, str, int], R1, |tmp:///ex1b.csv|, header = false, separator = ";");
```

The empty line after the first writeCSV breaks the repl simulator by throwing a ParseError unexpectedly. The real REPL goes to the first continuation prompt on an empty line. If that is right, then the TutorCommandExecutor should simulate this.

jurgenvinju avatar Apr 07 '25 11:04 jurgenvinju