fix several typos in documentation and comments (#12553)

This commit is contained in:
Nindaleth 2019-10-30 09:08:45 +01:00 • committed by Miran
commit 34dbc5699e
29 changed files with 37 additions and 37 deletions

View file

@ -44,7 +44,7 @@ discard """
# - No way to check on memory use
# - No cyclic data structures
# - No attempt to measure variation with object size
# - Results are sensitive to locking cost, but we dont
# - Results are sensitive to locking cost, but we don't
# check for proper locking
#

View file

@ -114,7 +114,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped =
packBody.add(newCall("pack", streamID, dotName))
readBody.add(resName := newCall("read" & $typeFields[i][1].ident, streamID))
else:
error("I dont know what to do with: " & treerepr(typeFields[i]))
error("I don't know what to do with: " & treerepr(typeFields[i]))
var
toStringFunc = newNimNode(nnkProcDef).und(

View file

@ -23,7 +23,7 @@ when false:
var d32 = v8 + 10'i32
when false:
# these dont work yet because unsigned.nim is stupid. XXX We need to fix this.
# these don't work yet because unsigned.nim is stupid. XXX We need to fix this.
var f8 = v16 + 10'u8
var f16 = v16 + 10'u16
var f32 = v16 + 10'u32

View file

@ -3,7 +3,7 @@ discard """
file: "tadrdisc.nim"
line: 20
"""
# Test that the address of a dicriminants cannot be taken
# Test that the address of a discriminants cannot be taken
type
TKind = enum ka, kb, kc

View file

@ -87,7 +87,7 @@ proc has(c: Captures; i: range[0..pegs.MaxSubpatterns-1]): bool {.nosideeffect,
result = b.first <= b.last
proc get(str: string; c: Captures; i: range[0..MaxSubpatterns-1]; def: char): char {.nosideeffect, inline.} =
## If capture `i` is non-empty return that portion of `str` casted
## If capture `i` is non-empty return that portion of `str` cast
## to `char`, otherwise return `def`.
result = if c.has(i): str[c.bounds(i).first] else: def
@ -344,7 +344,7 @@ proc writeformat(o: var Writer; p: pointer; fmt: Format) =
## Write pointer `i` according to format `fmt` using output object
## `o` and output function `add`.
##
## Pointers are casted to unsigned int and formatted as hexadecimal
## Pointers are cast to unsigned int and formatted as hexadecimal
## with prefix unless specified otherwise.
var f = fmt
if f.typ == 0.char: