diff --git a/vlib/os/os_nix.v b/vlib/os/os_nix.v index b5247c18a7..aa75b3959b 100644 --- a/vlib/os/os_nix.v +++ b/vlib/os/os_nix.v @@ -22,7 +22,7 @@ const ( fn C.symlink(charptr, charptr) int -pub fn init_os_args(argc int, argv &byteptr) []string { +fn init_os_args(argc int, argv &byteptr) []string { mut args := []string for i in 0 .. argc { args << string(argv[i]) diff --git a/vlib/v/ast/str.v b/vlib/v/ast/str.v index c2215a85e6..1acbcb0531 100644 --- a/vlib/v/ast/str.v +++ b/vlib/v/ast/str.v @@ -20,8 +20,7 @@ pub fn (node &FnDecl) str(t &table.Table) string { should_add_type := is_last_arg || node.args[i + 1].typ != arg.typ f.write(arg.name) if should_add_type { - arg_typ_sym := t.get_type_symbol(arg.typ) - f.write(' ${arg_typ_sym.name}') + f.write(' ' + t.type_to_str(arg.typ)) } if !is_last_arg { f.write(', ') @@ -29,8 +28,7 @@ pub fn (node &FnDecl) str(t &table.Table) string { } f.write(')') if node.typ != table.void_type { - sym := t.get_type_symbol(node.typ) - f.write(' ' + sym.name) + f.write(' ' + t.type_to_str(node.typ)) } return f.str() } diff --git a/vlib/v/doc/doc.v b/vlib/v/doc/doc.v index 55d1b85066..dd60946129 100644 --- a/vlib/v/doc/doc.v +++ b/vlib/v/doc/doc.v @@ -40,7 +40,7 @@ pub fn doc(mod string, table &table.Table) string { if !file.ends_with('.v') { continue } - if file.ends_with('_test.v') { + if file.ends_with('_test.v') || file.ends_with('_windows.v') || file.ends_with('_macos.v') { continue } file_ast := parser.parse_file(filepath.join(path,file), table) diff --git a/vlib/v/table/atype_symbols.v b/vlib/v/table/atype_symbols.v index 53ce63603c..ffb5c3cd18 100644 --- a/vlib/v/table/atype_symbols.v +++ b/vlib/v/table/atype_symbols.v @@ -392,3 +392,8 @@ pub mut: key_type Type value_type Type } + +pub fn (table &Table) type_to_str(t Type) string { + sym := table.get_type_symbol(t) + return sym.name.replace('array_', '[]') +}