cmd/v: error-limit
parent
67750c91d7
commit
85d19dd253
|
@ -45,8 +45,14 @@ 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
|
||||||
pub fn (mut b Builder) parse_imports() {
|
pub fn (mut b Builder) parse_imports() {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue