repl: fix newline in error messages
parent
8dc0c5a699
commit
f396f70ae7
|
@ -148,7 +148,7 @@ fn run_repl(workdir string, vrepl_prefix string) {
|
|||
// but don't add this print call to the `lines` array,
|
||||
// so that it doesn't get called during the next print.
|
||||
if r.line.starts_with('print') {
|
||||
source_code := r.functions.join('\n') + r.lines.join('\n') + '\n' + r.line
|
||||
source_code := r.functions.join('\n') + r.lines.join('\n') + '\n' + r.line + '\n'
|
||||
os.write_file(file, source_code)
|
||||
s := os.exec('"$vexe" -repl run $file') or {
|
||||
rerror(err)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
println(a)
|
||||
===output===
|
||||
.vrepl.v:2:20: error: undefined: `a`
|
||||
.vrepl.v:2:9: error: undefined: `a`
|
||||
1 |
|
||||
2 | println(a)
|
||||
|
|
||||
| ^
|
||||
|
|
Loading…
Reference in New Issue