cgen: minor fixes
parent
6b571155f4
commit
5a7f683f61
|
@ -16,7 +16,8 @@ pub fn parse_pref(args []string, callback fn(string, &Instance, &pref.Preference
|
||||||
args: args
|
args: args
|
||||||
current_pos: 0
|
current_pos: 0
|
||||||
}
|
}
|
||||||
tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
|
//tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
|
||||||
|
tmp := p.parse_impl(args, obj, void_cb(callback)) or {
|
||||||
return error(err)
|
return error(err)
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
|
@ -40,7 +41,7 @@ pub fn parse_main_cmd(args []string, callback fn(string, &Instance, &MainCmdPref
|
||||||
args: args
|
args: args
|
||||||
current_pos: 0
|
current_pos: 0
|
||||||
}
|
}
|
||||||
tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
|
tmp := p.parse_impl(args, obj, void_cb(callback)) or {
|
||||||
return error(err)
|
return error(err)
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
|
|
|
@ -26,7 +26,7 @@ const (
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
prefs := flag.MainCmdPreferences{}
|
prefs := flag.MainCmdPreferences{}
|
||||||
values := flag.parse_main_cmd(os.args, parse_flags, &prefs) or {
|
values := flag.parse_main_cmd(os.args, parse_flags, prefs) or {
|
||||||
println('V Error: An error has occurred while parsing flags: ')
|
println('V Error: An error has occurred while parsing flags: ')
|
||||||
println(err)
|
println(err)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
|
@ -346,7 +346,7 @@ fn (p mut Parser) fn_decl() {
|
||||||
if p.tok == .lt {
|
if p.tok == .lt {
|
||||||
// instance (dispatch)
|
// instance (dispatch)
|
||||||
if p.generic_dispatch.inst.size > 0 {
|
if p.generic_dispatch.inst.size > 0 {
|
||||||
rename_generic_fn_instance(mut f, &p.generic_dispatch)
|
rename_generic_fn_instance(mut f, p.generic_dispatch)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
f.is_generic = true
|
f.is_generic = true
|
||||||
|
|
Loading…
Reference in New Issue