mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cmd/v: error-limit
This commit is contained in:
parent
67750c91d7
commit
85d19dd253
|
@ -45,7 +45,13 @@ pub fn new_builder(pref &pref.Preferences) Builder {
|
||||||
parent: 0
|
parent: 0
|
||||||
}
|
}
|
||||||
compiled_dir: compiled_dir
|
compiled_dir: compiled_dir
|
||||||
|
max_nr_errors: if pref.error_limit > 0 {
|
||||||
|
pref.error_limit
|
||||||
|
} else {
|
||||||
|
100
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// max_nr_errors: pref.error_limit ?? 100 TODO potential syntax?
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse all deps from already parsed files
|
// parse all deps from already parsed files
|
||||||
|
|
|
@ -236,9 +236,9 @@ fn (mut g Gen) fn_args(args []table.Arg, is_variadic bool) ([]string, []string)
|
||||||
caname := c_name(arg.name)
|
caname := c_name(arg.name)
|
||||||
arg_type_sym := g.table.get_type_symbol(arg.typ)
|
arg_type_sym := g.table.get_type_symbol(arg.typ)
|
||||||
mut arg_type_name := g.typ(arg.typ) // arg_type_sym.name.replace('.', '__')
|
mut arg_type_name := g.typ(arg.typ) // arg_type_sym.name.replace('.', '__')
|
||||||
if arg.name == 'xxx' {
|
// if arg.name == 'xxx' {
|
||||||
println('! ' + arg_type_name)
|
// println('! ' + arg_type_name)
|
||||||
}
|
// }
|
||||||
is_varg := i == args.len - 1 && is_variadic
|
is_varg := i == args.len - 1 && is_variadic
|
||||||
if is_varg {
|
if is_varg {
|
||||||
varg_type_str := int(arg.typ).str()
|
varg_type_str := int(arg.typ).str()
|
||||||
|
@ -269,7 +269,7 @@ fn (mut g Gen) fn_args(args []table.Arg, is_variadic bool) ([]string, []string)
|
||||||
fargtypes << arg_type_name
|
fargtypes << arg_type_name
|
||||||
} else {
|
} else {
|
||||||
mut nr_muls := arg.typ.nr_muls()
|
mut nr_muls := arg.typ.nr_muls()
|
||||||
s := arg_type_name + '/*F*/ ' + caname
|
s := arg_type_name + ' ' + caname
|
||||||
if arg.is_mut {
|
if arg.is_mut {
|
||||||
// mut arg needs one *
|
// mut arg needs one *
|
||||||
nr_muls = 1
|
nr_muls = 1
|
||||||
|
|
|
@ -203,7 +203,7 @@ pub fn parse_args(args []string) (&Preferences, string) {
|
||||||
res.print_v_files = true
|
res.print_v_files = true
|
||||||
}
|
}
|
||||||
'-error-limit' {
|
'-error-limit' {
|
||||||
res.error_limit =cmdline.option(current_args, '-error-limit', '0').int()
|
res.error_limit =cmdline.option(current_args, '-error-limit', '0').int()
|
||||||
}
|
}
|
||||||
'-os' {
|
'-os' {
|
||||||
target_os := cmdline.option(current_args, '-os', '')
|
target_os := cmdline.option(current_args, '-os', '')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user