1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
yuyi 2020-03-27 17:01:46 +08:00 committed by GitHub
parent bee8972632
commit ed42b864c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,13 +152,13 @@ pub fn run_repl(workdir string, vrepl_prefix string) []string {
mut temp_line := r.line
mut temp_flag := false
func_call := r.function_call(r.line)
if !(
r.line.contains(' ') ||
r.line.contains(':') ||
r.line.contains('=') ||
r.line.contains(',') ||
r.line.ends_with('++') ||
r.line.ends_with('--') ||
filter_line := r.line.replace(r.line.find_between('\'', '\''), '').replace(r.line.find_between('"', '"'), '')
if !(filter_line.contains(':') ||
filter_line.contains('=') ||
filter_line.contains(',') ||
filter_line.contains('++') ||
filter_line.contains('--') ||
filter_line.starts_with('import') ||
r.line == '') && !func_call {
temp_line = 'println($r.line)'
temp_flag = true