mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: fix typos in comments (#20963)
This commit is contained in:
parent
a58f980b02
commit
78602846e5
21 changed files with 29 additions and 29 deletions
|
@ -46,7 +46,7 @@
|
|||
- [ ] Custom attributes
|
||||
- [ ] `arr.first() or { }` like `arr[0] or { }`
|
||||
- [ ] ORM migrations
|
||||
- [ ] Contexts that are passed implicitely (e.g. for custom allocation/memory management)
|
||||
- [ ] Contexts that are passed implicitly (e.g. for custom allocation/memory management)
|
||||
|
||||
## [Version 1.0]
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const win_height = 800
|
|||
const bg_color = gx.white
|
||||
|
||||
// A transparent color is used to aid in verifying that
|
||||
// rendering is precise on each of the the arc types (e.g. no overlapping or double rendered slices)
|
||||
// rendering is precise on each of the arc types (e.g. no overlapping or double rendered slices)
|
||||
const colour = gx.rgba(100, 100, 0, 100)
|
||||
|
||||
enum Selection {
|
||||
|
|
|
@ -24,7 +24,7 @@ $ ./aStar
|
|||
# Demo
|
||||

|
||||
|
||||
# 🔴🔴🔴🔴 Area of improvments 🔴🔴🔴🔴🔴
|
||||
# 🔴🔴🔴🔴 Area of improvements 🔴🔴🔴🔴🔴
|
||||
|
||||
- 🚧 Under Construction: We are using heap, but that is not correctly
|
||||
implemented, since instead of O(log(n)) it takes O(n). For that reason,
|
||||
|
|
|
@ -86,7 +86,7 @@ fn main() {
|
|||
init_fn: init_images // run at start of application
|
||||
user_data: app // store user data
|
||||
)
|
||||
mut grid := initialise_grid() // initialize the grid varibale and populate the matrix with each cell as empty
|
||||
mut grid := initialise_grid() // initialize the grid variable and populate the matrix with each cell as empty
|
||||
app.grid = grid // set grid to app attribute so you can access it by just passing app variable or with method of app
|
||||
app.ui.dpi_scale = 1.0 // set scale this is use to make it responsive
|
||||
app.start = &Point{ // set start point to -1, -1
|
||||
|
|
2
thirdparty/fontstash/stb_truetype.h
vendored
2
thirdparty/fontstash/stb_truetype.h
vendored
|
@ -651,7 +651,7 @@ STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h
|
|||
STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip);
|
||||
// If skip != 0, this tells stb_truetype to skip any codepoints for which
|
||||
// there is no corresponding glyph. If skip=0, which is the default, then
|
||||
// codepoints without a glyph recived the font's "missing character" glyph,
|
||||
// codepoints without a glyph received the font's "missing character" glyph,
|
||||
// typically an empty box by convention.
|
||||
|
||||
STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above
|
||||
|
|
4
thirdparty/libgc/gc.c
vendored
4
thirdparty/libgc/gc.c
vendored
|
@ -6592,7 +6592,7 @@ GC_INNER GC_bool GC_collection_in_progress(void);
|
|||
/* Collection is in progress, or was abandoned. */
|
||||
|
||||
/* Push contents of the symbol residing in the static roots area */
|
||||
/* excluded from scanning by the the collector for a reason. */
|
||||
/* excluded from scanning by the collector for a reason. */
|
||||
/* Note: it should be used only for symbols of relatively small size */
|
||||
/* (one or several words). */
|
||||
#define GC_PUSH_ALL_SYM(sym) GC_push_all_eager(&(sym), &(sym) + 1)
|
||||
|
@ -7917,7 +7917,7 @@ typedef struct {
|
|||
/* to allow it to be distinguished from a free list */
|
||||
/* link. This means the plain version must have the least */
|
||||
/* significant bit of zero. Note that blocks dropped by */
|
||||
/* black-listing will also have the the least significant */
|
||||
/* black-listing will also have the least significant */
|
||||
/* bit clear once debugging has started; we are careful */
|
||||
/* never to overwrite such a value. */
|
||||
# if ALIGNMENT == 1
|
||||
|
|
|
@ -352,7 +352,7 @@ int mbedtls_asn1_write_octet_string( unsigned char **p, const unsigned char *sta
|
|||
* the existing buffer to fit \p val_len.
|
||||
*
|
||||
* \return A pointer to the new / existing entry on success.
|
||||
* \return \c NULL if if there was a memory allocation error.
|
||||
* \return \c NULL if there was a memory allocation error.
|
||||
*/
|
||||
mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data **list,
|
||||
const char *oid, size_t oid_len,
|
||||
|
|
2
thirdparty/mbedtls/library/debug.c
vendored
2
thirdparty/mbedtls/library/debug.c
vendored
|
@ -121,7 +121,7 @@ void mbedtls_debug_print_ret( const mbedtls_ssl_context *ssl, int level,
|
|||
/*
|
||||
* With non-blocking I/O and examples that just retry immediately,
|
||||
* the logs would be quickly flooded with WANT_READ, so ignore that.
|
||||
* Don't ignore WANT_WRITE however, since is is usually rare.
|
||||
* Don't ignore WANT_WRITE however, since is usually rare.
|
||||
*/
|
||||
if( ret == MBEDTLS_ERR_SSL_WANT_READ )
|
||||
return;
|
||||
|
|
2
thirdparty/mbedtls/library/ssl_client.c
vendored
2
thirdparty/mbedtls/library/ssl_client.c
vendored
|
@ -732,7 +732,7 @@ static int ssl_prepare_client_hello( mbedtls_ssl_context *ssl )
|
|||
|
||||
/*
|
||||
* Generate the random bytes, except when responding to a verify request
|
||||
* where we MUST reuse the previoulsy generated random bytes
|
||||
* where we MUST reuse the previously generated random bytes
|
||||
* (RFC 6347 4.2.1).
|
||||
*/
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
|
|
2
thirdparty/sokol/util/sokol_gl.h
vendored
2
thirdparty/sokol/util/sokol_gl.h
vendored
|
@ -453,7 +453,7 @@
|
|||
|
||||
sgl_set_context(ctx);
|
||||
|
||||
The currently active context will implicitely be used by most sokol-gl functions
|
||||
The currently active context will implicitly be used by most sokol-gl functions
|
||||
which don't take an explicit context handle as argument.
|
||||
|
||||
To switch back to the default context, pass the global constant SGL_DEFAULT_CONTEXT:
|
||||
|
|
|
@ -52,7 +52,7 @@ pub fn new_benchmark_pointer() &Benchmark {
|
|||
}
|
||||
}
|
||||
|
||||
// set_total_expected_steps sets the the total amount of steps the benchmark is expected to take.
|
||||
// set_total_expected_steps sets the total amount of steps the benchmark is expected to take.
|
||||
pub fn (mut b Benchmark) set_total_expected_steps(n int) {
|
||||
b.nexpected_steps = n
|
||||
}
|
||||
|
|
|
@ -438,7 +438,7 @@ pub fn (mut s []string) sort_ignore_case() {
|
|||
s.sort_with_compare(compare_lower_strings)
|
||||
}
|
||||
|
||||
// sort_by_len sorts the the string array by each string's `.len` length.
|
||||
// sort_by_len sorts the string array by each string's `.len` length.
|
||||
pub fn (mut s []string) sort_by_len() {
|
||||
s.sort_with_compare(compare_strings_by_len)
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ fn (s string) index_last_(p string) int {
|
|||
return -1
|
||||
}
|
||||
|
||||
// index_last returns the position of the first character of the *last* occurance of the `needle` string in `s`.
|
||||
// index_last returns the position of the first character of the *last* occurrence of the `needle` string in `s`.
|
||||
pub fn (s string) index_last(needle string) ?int {
|
||||
idx := s.index_last_(needle)
|
||||
if idx == -1 {
|
||||
|
@ -758,7 +758,7 @@ pub fn (s string) index_last(needle string) ?int {
|
|||
return idx
|
||||
}
|
||||
|
||||
// last_index returns the position of the first character of the *last* occurance of the `needle` string in `s`.
|
||||
// last_index returns the position of the first character of the *last* occurrence of the `needle` string in `s`.
|
||||
@[deprecated: 'use `.index_last(needle string)` instead']
|
||||
@[deprecated_after: '2023-12-18']
|
||||
@[inline]
|
||||
|
|
|
@ -1205,7 +1205,7 @@ fn (s string) index_(p string) int {
|
|||
return -1
|
||||
}
|
||||
|
||||
// index returns the position of the first character of the first occurance of the `needle` string in `s`.
|
||||
// index returns the position of the first character of the first occurrence of the `needle` string in `s`.
|
||||
// It will return `none` if the `needle` string can't be found in `s`.
|
||||
pub fn (s string) index(p string) ?int {
|
||||
idx := s.index_(p)
|
||||
|
@ -1215,7 +1215,7 @@ pub fn (s string) index(p string) ?int {
|
|||
return idx
|
||||
}
|
||||
|
||||
// index_last returns the position of the first character of the *last* occurance of the `needle` string in `s`.
|
||||
// index_last returns the position of the first character of the *last* occurrence of the `needle` string in `s`.
|
||||
pub fn (s string) index_last(needle string) ?int {
|
||||
idx := s.index_last_(needle)
|
||||
if idx == -1 {
|
||||
|
@ -1224,7 +1224,7 @@ pub fn (s string) index_last(needle string) ?int {
|
|||
return idx
|
||||
}
|
||||
|
||||
// last_index returns the position of the first character of the *last* occurance of the `needle` string in `s`.
|
||||
// last_index returns the position of the first character of the *last* occurrence of the `needle` string in `s`.
|
||||
@[deprecated: 'use `.index_last(needle string)` instead']
|
||||
@[deprecated_after: '2023-12-18']
|
||||
@[inline]
|
||||
|
@ -1805,7 +1805,7 @@ pub fn (mut s []string) sort_ignore_case() {
|
|||
s.sort_with_compare(compare_lower_strings)
|
||||
}
|
||||
|
||||
// sort_by_len sorts the the string array by each string's `.len` length.
|
||||
// sort_by_len sorts the string array by each string's `.len` length.
|
||||
@[inline]
|
||||
pub fn (mut s []string) sort_by_len() {
|
||||
s.sort_with_compare(compare_strings_by_len)
|
||||
|
|
|
@ -12,7 +12,7 @@ pub fn vwasm_heap_base() voidptr {
|
|||
}
|
||||
|
||||
// vwasm_heap_size returns the size of the main wasm memory in pages.
|
||||
// Analagous to the `memory.size` instruction.
|
||||
// Analogous to the `memory.size` instruction.
|
||||
pub fn vwasm_memory_size() int {
|
||||
mut rval := 0
|
||||
asm wasm {
|
||||
|
@ -24,7 +24,7 @@ pub fn vwasm_memory_size() int {
|
|||
}
|
||||
|
||||
// vwasm_memory_grow grows the main wasm memory by `size` pages.
|
||||
// Analagous to the `memory.grow` instruction.
|
||||
// Analogous to the `memory.grow` instruction.
|
||||
pub fn vwasm_memory_grow(size int) int {
|
||||
mut rval := 0
|
||||
asm wasm {
|
||||
|
|
|
@ -2,7 +2,7 @@ module stats
|
|||
|
||||
import math
|
||||
|
||||
// freq calculates the Measure of Occurance
|
||||
// freq calculates the Measure of Occurrence
|
||||
// Frequency of a given number
|
||||
// Based on
|
||||
// https://www.mathsisfun.com/data/frequency-distribution.html
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn new() RE {
|
|||
// init regex
|
||||
mut re := RE{}
|
||||
re.prog = []Token{len: max_code_len + 1} // max program length, can not be longer then the pattern
|
||||
re.cc = []CharClass{len: max_code_len} // can not be more char class the the length of the pattern
|
||||
re.cc = []CharClass{len: max_code_len} // can not be more char class the length of the pattern
|
||||
re.group_csave_flag = false // enable continuos group saving
|
||||
re.group_max_nested = 128 // set max 128 group nested
|
||||
re.group_max = max_code_len >> 1 // we can't have more groups than the half of the pattern legth
|
||||
|
@ -38,7 +38,7 @@ pub fn regex_opt(pattern string) !RE {
|
|||
// init regex
|
||||
mut re := RE{}
|
||||
re.prog = []Token{len: pattern.len + 1} // max program length, can not be longer then the pattern
|
||||
re.cc = []CharClass{len: pattern.len} // can not be more char class the the length of the pattern
|
||||
re.cc = []CharClass{len: pattern.len} // can not be more char class the length of the pattern
|
||||
re.group_csave_flag = false // enable continuos group saving
|
||||
re.group_max_nested = pattern.len >> 1 // set max 128 group nested
|
||||
re.group_max = pattern.len >> 1 // we can't have more groups than the half of the pattern legth
|
||||
|
|
|
@ -20,7 +20,7 @@ pub fn regex_base(pattern string) (RE, int, int) {
|
|||
// init regex
|
||||
mut re := RE{}
|
||||
re.prog = []Token{len: pattern.len + 1} // max program length, can not be longer then the pattern
|
||||
re.cc = []CharClass{len: pattern.len} // can not be more char class the the length of the pattern
|
||||
re.cc = []CharClass{len: pattern.len} // can not be more char class the length of the pattern
|
||||
re.group_csave_flag = false // enable continuos group saving
|
||||
re.group_max_nested = pattern.len >> 1 // set max 128 group nested
|
||||
re.group_max = pattern.len >> 1 // we can't have more groups than the half of the pattern legth
|
||||
|
|
|
@ -776,7 +776,7 @@ pub enum Kind {
|
|||
thread
|
||||
}
|
||||
|
||||
// str returns the the internal & source name of the type
|
||||
// str returns the internal & source name of the type
|
||||
pub fn (t TypeSymbol) str() string {
|
||||
return t.name
|
||||
}
|
||||
|
|
|
@ -2343,7 +2343,7 @@ fn (mut c Checker) hash_stmt(mut node ast.HashStmt) {
|
|||
node.ct_conds = c.ct_cond_stack.clone()
|
||||
}
|
||||
if c.pref.backend.is_js() || c.pref.backend == .golang {
|
||||
// consider the the best way to handle the .go.vv files
|
||||
// consider the best way to handle the .go.vv files
|
||||
if !c.file.path.ends_with('.js.v') && !c.file.path.ends_with('.go.v')
|
||||
&& !c.file.path.ends_with('.go.vv') {
|
||||
c.error('hash statements are only allowed in backend specific files such "x.js.v" and "x.go.v"',
|
||||
|
|
|
@ -408,7 +408,7 @@ fn (mut p Parser) expr(min_bp token.BindingPower) ast.Expr {
|
|||
// to currently do this is to check for an ident where the name's first char is a capital, this is not
|
||||
// great at all, and would be the only place in the parser where a capital letter is relied upon, or even
|
||||
// the name at all is relied upon. imo this is context the parser should not need, and we should either
|
||||
// change the varibale capture syntax, or move the position of the capture list, for example:
|
||||
// change the variable capture syntax, or move the position of the capture list, for example:
|
||||
// change syntax: `fn <var_a, var_b> [T] () { ... }`, move position: `fn [T] () { ... } [var_a, var_b]`
|
||||
// personally I think `fn <var_a, var_b> [T] () { ... }` is a great option.
|
||||
mut captured_vars := []ast.Expr{}
|
||||
|
|
|
@ -12,7 +12,7 @@ keep sending events to the client. But if we hold the connection open indefinite
|
|||
vweb isn't able to process any other requests.
|
||||
|
||||
We can let vweb know that it can continue processing other requests and that we will
|
||||
handle the connection ourself by calling `ctx.takeover_conn()` and and returning an empty result
|
||||
handle the connection ourself by calling `ctx.takeover_conn()` and returning an empty result
|
||||
with `vweb.no_result()`. Vweb will not close the connection and we can handle
|
||||
the connection in a separate thread.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue