vrepl: fix error for exitasdfasdf in repl (fix #14593) (#14598)

master
yuyi 2022-06-03 00:59:57 +08:00 committed by GitHub
parent 9f7656f328
commit 251716fa0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -305,7 +305,6 @@ fn run_repl(workdir string, vrepl_prefix string) int {
return int(rc)
}
}
break
}
r.line = line
if r.line == '\n' {
@ -388,12 +387,12 @@ fn run_repl(workdir string, vrepl_prefix string) int {
'#include ',
'for ',
'or ',
'insert',
'delete',
'prepend',
'sort',
'clear',
'trim',
'insert(',
'delete(',
'prepend(',
'sort(',
'clear(',
'trim(',
' as ',
]
mut is_statement := false

View File

@ -0,0 +1,7 @@
exitasdfasdf
===output===
error: undefined ident: `exitasdfasdf`
5 | import math
6 |
7 | println(exitasdfasdf)
| ~~~~~~~~~~~~