mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
vlib: reduce false positive matches for ///
, cleanup commented code
This commit is contained in:
parent
af6247135c
commit
615e74d341
@ -113,8 +113,8 @@ pub fn (r NormalReporter) report_stop() {
|
||||
eprintln('')
|
||||
}
|
||||
|
||||
//// TODO: reconsider if these should be public:
|
||||
|
||||
// progress will show the given message normally
|
||||
// TODO: reconsider if these should be public:
|
||||
pub fn (r NormalReporter) progress(index int, message string) {
|
||||
eprintln(message)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
module datatypes
|
||||
|
||||
/// Internal representation of the tree node
|
||||
// Internal representation of the tree node
|
||||
@[heap]
|
||||
struct BSTreeNode[T] {
|
||||
mut:
|
||||
|
@ -926,7 +926,7 @@ pub fn (mut dl Dlmalloc) malloc(size usize) voidptr {
|
||||
}
|
||||
}
|
||||
|
||||
/// malloc behaves as libc malloc, but operates within the given space
|
||||
// malloc_real behaves as libc malloc, but operates within the given space
|
||||
@[unsafe]
|
||||
fn (mut dl Dlmalloc) malloc_real(size usize) voidptr {
|
||||
mut nb := usize(0)
|
||||
|
@ -3,10 +3,9 @@ module dlmalloc
|
||||
|
||||
__global global = new(get_system_allocator())
|
||||
|
||||
/// malloc allocates `size` bytes.
|
||||
///
|
||||
/// Returns a null pointer if allocation fails. Returns a valid pointer
|
||||
/// otherwise.
|
||||
// malloc allocates `size` bytes.
|
||||
// It returns a null pointer if allocation fails.
|
||||
// It returns a valid pointer otherwise.
|
||||
@[unsafe]
|
||||
pub fn malloc(size usize) voidptr {
|
||||
unsafe {
|
||||
|
@ -1,6 +1,6 @@
|
||||
module io
|
||||
|
||||
/// Eof error means that we reach the end of the stream.
|
||||
// Eof error means that we reach the end of the stream.
|
||||
pub struct Eof {
|
||||
Error
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
module os
|
||||
|
||||
/// Eof error means that we reach the end of the file.
|
||||
// Eof error means that we reach the end of the file.
|
||||
pub struct Eof {
|
||||
Error
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ fn (mut c Checker) ident_autocomplete(node ast.Ident) {
|
||||
if !c.pref.linfo.vars_printed[nt] { // avoid dups
|
||||
sb.writeln('===')
|
||||
sb.writeln('VAR ${nt}') //${node.name}:${sym.name}')
|
||||
/// print_backtrace()
|
||||
// print_backtrace()
|
||||
/*
|
||||
if sym.kind == .alias {
|
||||
parent_sym := c.table.sym(sym.parent_type)
|
||||
|
@ -754,7 +754,7 @@ fn (mut g Gen) fn_decl_params(params []ast.Param, scope &ast.Scope, is_variadic
|
||||
g.write('void')
|
||||
}
|
||||
}
|
||||
/// mut is_implicit_ctx := false
|
||||
// mut is_implicit_ctx := false
|
||||
// Veb actions defined by user can have implicit context
|
||||
/*
|
||||
if g.cur_fn != unsafe { nil } && g.cur_fn.is_method && g.cur_mod.name != 'veb' {
|
||||
|
@ -317,7 +317,7 @@ pub fn (mut g Gen) generate_macho_object_header() {
|
||||
g.write32(0)
|
||||
g.write32(0)
|
||||
g.write32(0)
|
||||
/// ???
|
||||
// ???
|
||||
g.write32(0x32)
|
||||
g.write32(0x18)
|
||||
g.write32(0x01)
|
||||
|
@ -2,11 +2,6 @@
|
||||
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
|
||||
module pref
|
||||
|
||||
// import v.ast
|
||||
// import v.pref
|
||||
// import os
|
||||
|
||||
// fn (mut p Pref) parse_line_info(line string, all_ast_files []&ast.File) {
|
||||
fn (mut p Preferences) parse_line_info(line string) {
|
||||
// println("parse_line_info '${line}'")
|
||||
format_err := 'wrong format, use `-line-info "file.v:24:expr_to_look_up"'
|
||||
@ -22,34 +17,6 @@ fn (mut p Preferences) parse_line_info(line string) {
|
||||
eprintln(format_err)
|
||||
return
|
||||
}
|
||||
|
||||
// println('files.len=${c.files.len}')
|
||||
// Find which file contains the line
|
||||
mut found := true // false
|
||||
//// mut found_path := ''
|
||||
// mut found_file_idx := -1
|
||||
/*
|
||||
for i, file in all_ast_files {
|
||||
// base := os.base(file.path)
|
||||
base := file.path // os.base(file.path)
|
||||
// println(base)
|
||||
if base == file_name {
|
||||
if found {
|
||||
eprintln('more than one "${file_name}" found: "${file.path}" and "${found_path}"')
|
||||
return
|
||||
}
|
||||
found = true
|
||||
found_path = file.path
|
||||
found_file_idx = i
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if !found {
|
||||
eprintln('file "${file_name}" not found among those parsed')
|
||||
return
|
||||
}
|
||||
|
||||
p.linfo = LineInfo{
|
||||
line_nr: line_nr
|
||||
path: file_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user