lastConstType string
curPackageName string
curPackage *ast.Package
- prevConstType map[string]string // identifer -> "ideal-int"
+ prevConstType map[string]string // identifier -> "ideal-int"
packageState map[string]loadState
interfaces map[pkgSymbol]*ast.InterfaceType
selectorFullPkg map[string]string // "http" => "net/http", updated by imports
for _, imp := range f.Imports {
if importPath(imp) == oldPath {
rewrote = true
- // record old End, beacuse the default is to compute
+ // record old End, because the default is to compute
// it using the length of imp.Path.Value.
imp.EndPos = imp.End()
imp.Path.Value = strconv.Quote(newPath)
//
// Not all type checks result in a single Kind check. The rewrite of the type check for
// reflect.ArrayOrSliceType checks x.Kind() against reflect.Array and reflect.Slice.
-// The rewrite for *reflect.IntType checks againt Int, Int8, Int16, Int32, Int64.
+// The rewrite for *reflect.IntType checks against Int, Int8, Int16, Int32, Int64.
// The rewrite for *reflect.UintType adds Uintptr.
//
// A type switch turns into an assignment and a switch on Kind:
// put into prdptr array in the format
// target
// followed by id's of terminals and non-terminals
- // followd by -nprod
+ // followed by -nprod
for t != MARK && t != ENDFILE {
mem := 0
in[i] += p224ZeroModP63[i]
}
- // Elimintate the coefficients at 2**224 and greater.
+ // Eliminate the coefficients at 2**224 and greater.
for i := 14; i >= 8; i-- {
in[i-8] -= in[i]
in[i-5] += (in[i] & 0xffff) << 12
a[0] += mask & (1 << 28)
}
-// p224Invert calcuates *out = in**-1 by computing in**(2**224 - 2**96 - 1),
+// p224Invert calculates *out = in**-1 by computing in**(2**224 - 2**96 - 1),
// i.e. Fermat's little theorem.
func p224Invert(out, in *p224FieldElement) {
var f1, f2, f3, f4 p224FieldElement
Structs, arrays and slices are also supported. Strings and arrays of bytes are
supported with a special, efficient representation (see below). When a slice is
decoded, if the existing slice has capacity the slice will be extended in place;
-if not, a new array is allocated. Regardless, the length of the resuling slice
+if not, a new array is allocated. Regardless, the length of the resulting slice
reports the number of elements decoded.
Functions and channels cannot be sent in a gob. Attempting
// If the field type has an XMLName field, the names must match
// so that the behavior of both marshalling and unmarshalling
- // is straighforward and unambiguous.
+ // is straightforward and unambiguous.
if finfo.flags&fElement != 0 {
ftyp := f.Type
xmlname := lookupXMLName(ftyp)
/*
-Ebnflint verifies that EBNF productions are consistent and gramatically correct.
+Ebnflint verifies that EBNF productions are consistent and grammatically correct.
It reads them from an HTML document such as the Go specification.
Grammar productions are grouped in boxes demarcated by the HTML elements
// Wrappers for tables.go
-// The 16-bit value of the decompostion tries is an index into a byte
+// The 16-bit value of the decomposition tries is an index into a byte
// array of UTF-8 decomposition sequences. The first byte is the number
// of bytes in the decomposition (excluding this length byte). The actual
// sequence starts at the offset+1.
if lastWasBlank && !lastWasHeading && i+2 < len(lines) &&
isBlank(lines[i+1]) && !isBlank(lines[i+2]) && indentLen(lines[i+2]) == 0 {
- // current line is non-blank, sourounded by blank lines
+ // current line is non-blank, surrounded by blank lines
// and the next non-blank line is not indented: this
// might be a heading.
if head := heading(line); head != "" {
a = fmt.Sprint(args...)
}
// TODO: detect cycles before calling Marshal which loops infinitely on
- // cyclic data. This may be an unnacceptable DoS risk.
+ // cyclic data. This may be an unacceptable DoS risk.
b, err := json.Marshal(a)
if err != nil {
)
// If the ifindex is zero, interfaceTable returns mappings of all
-// network interfaces. Otheriwse it returns a mapping of a specific
+// network interfaces. Otherwise it returns a mapping of a specific
// interface.
func interfaceTable(ifindex int) ([]Interface, error) {
var ift []Interface