fn print_line(stdout: &mut io::Stdout, lines: &[String], index: usize) -> crate::Result<()> {
        stdout
            .write_all(lines[index].as_bytes())
            .map_err(crossterm::ErrorKind::IoError)
    }
/// Given the lines of text, this function should print the line at index. This should be
/// overridden if you want to lint the output in the repl.
///
/// ## Why are all lines given, not just what needs to be printed?
///
/// Earlier, only the line that needed to be printed was given, but this caused issues while
/// linting multi-line programs which had specific things over multiple lines. For example take
/// the following lines:
/// ```ignore
/// <some-code> /* Multi
///     line
/// Comment */
/// ```
/// This probably would not be linted properly, since in line 2, the context that the word 'line'
/// is within a comment is lost. For correct behaviour (subject to language linting rules), all
/// the lines should be processed, but only `lines[index]` should be written to `stdout`.
Given the lines of text, this function should print the line at index. This should be
overridden if you want to lint the output in the repl.
Given the lines of text this function should print the line at index . This should be overridden if you want to lint the output in the repl .
fn print_line(stdout: &mut io::Stdout, lines: &[String], index: usize) -> crate::Result<()> {
        stdout
            .write_all(lines[index].as_bytes())
            .map_err(crossterm::ErrorKind::IoError)
    }
fn print_line ( stdout : & mut io :: Stdout , lines : & [ String ] , index : usize ) -> crate :: Result < ( ) > { stdout . write_all ( lines [ index ] . as_bytes ( ) ) . map_err ( crossterm :: ErrorKind :: IoError ) }
Given the lines of text, this function should print the line at index.
Given the lines of text this function should print the line at index .
stdout
&mut io::Stdout
lines
&[String]
index
usize
stdout
&mut io::Stdout
lines
&[String]
index
usize
why are all lines given, not just what needs to be printed?
Earlier, only the line that needed to be printed was given, but this caused issues while
linting multi-line programs which had specific things over multiple lines. For example take
the following lines:
```ignore
  Multi
line
Comment
```
This probably would not be linted properly, since in line 2, the context that the word 'line'
is within a comment is lost. For correct behaviour (subject to language linting rules), all
the lines should be processed, but only `lines[index]` should be written to `stdout`.
Earlier only the line that needed to be printed was given but this caused issues while linting multi - line programs which had specific things over multiple lines . For example take the following lines : ` ` ` ignore Multi line Comment ` ` ` This probably would not be linted properly since in line 2 the context that the word ' line ' is within a comment is lost . For correct behaviour ( subject to language linting rules ) all the lines should be processed but only ` lines [ index ] ` should be written to ` stdout ` .