mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
compiler: support explicit runrepl argument, so that the v repl can be launched with options like -debug and so on.
This commit is contained in:
parent
d1210b9e9f
commit
ec61821bf7
2 changed files with 7 additions and 6 deletions
|
@ -193,11 +193,6 @@ fn main() {
|
|||
os.mkdir(ModPath)
|
||||
}
|
||||
}
|
||||
// No args? REPL
|
||||
if args.len < 2 || (args.len == 2 && args[1] == '-') {
|
||||
run_repl()
|
||||
return
|
||||
}
|
||||
// Construct the V object from command line arguments
|
||||
mut v := new_v(args)
|
||||
if v.pref.is_verbose {
|
||||
|
@ -216,6 +211,12 @@ fn main() {
|
|||
v.run_compiled_executable_and_exit()
|
||||
}
|
||||
|
||||
// No args? REPL
|
||||
if args.len < 2 || (args.len == 2 && args[1] == '-') || 'runrepl' in args {
|
||||
run_repl()
|
||||
return
|
||||
}
|
||||
|
||||
v.compile()
|
||||
|
||||
if v.pref.is_test {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue