Fix the "limitt" typo.

This commit is contained in:
Nigel Tao committed 2017-10-27 11:10:25 +11:00
1 parent cbc8c39375
commit 9a8508857f
6 files changed
+15 -15

No files matched your search

+3 -3
View File
@@ -168,7 +168,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
b.writes(")")
return nil
}
if isInSrc(g.tm, n, t.KeyLimitt, 1) {
if isInSrc(g.tm, n, t.KeyLimit, 1) {
return fmt.Errorf("TODO: in.src.limit")
}
if isInSrc(g.tm, n, t.KeyMark, 0) {
@@ -182,7 +182,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
aPrefix, aPrefix, bPrefix, aPrefix)
return nil
}
if isInDst(g.tm, n, t.KeyLimitt, 1) {
if isInDst(g.tm, n, t.KeyLimit, 1) {
return fmt.Errorf("TODO: in.dst.limit")
}
if isInDst(g.tm, n, t.KeyMark, 0) {
@@ -303,7 +303,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
b.writes(")\n")
return nil
}
if isThatMethod(g.tm, n, t.KeyLimitt, 1) {
if isThatMethod(g.tm, n, t.KeyLimit, 1) {
// TODO: don't hard-code v_r or b_rptr_src.
b.printf("puffs_base__reader1__limit(&v_r, b_rptr_src,")
if err := g.writeExpr(b, n.Args()[0].Arg().Value(), rp, parenthesesOptional, depth); err != nil {
+2 -2
View File
@@ -671,7 +671,7 @@ func (g *gen) writeReadUXX(b *buffer, n *a.Expr, name string, size uint32, endia
func isInSrc(tm *t.Map, n *a.Expr, methodName t.Key, nArgs int) bool {
callSuspendible := methodName != t.KeySinceMark &&
methodName != t.KeyMark &&
methodName != t.KeyLimitt
methodName != t.KeyLimit
if n.ID0().Key() != t.KeyOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false
}
@@ -694,7 +694,7 @@ func isInDst(tm *t.Map, n *a.Expr, methodName t.Key, nArgs int) bool {
methodName != t.KeyCopyFromSlice &&
methodName != t.KeySinceMark &&
methodName != t.KeyMark &&
methodName != t.KeyLimitt
methodName != t.KeyLimit
// TODO: check that n.Args() is "(x:bar)".
if n.ID0().Key() != t.KeyOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false
+2 -2
View File
@@ -717,7 +717,7 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
isInSrc(q.tm, n, t.KeyReadU16BE, 0) || isInSrc(q.tm, n, t.KeyReadU32BE, 0) ||
isInSrc(q.tm, n, t.KeyReadU32BE, 0) || isInSrc(q.tm, n, t.KeyReadU32LE, 0) ||
isInSrc(q.tm, n, t.KeySkip32, 1) || isInSrc(q.tm, n, t.KeySinceMark, 0) ||
isInSrc(q.tm, n, t.KeyMark, 0) || isInSrc(q.tm, n, t.KeyLimitt, 1) ||
isInSrc(q.tm, n, t.KeyMark, 0) || isInSrc(q.tm, n, t.KeyLimit, 1) ||
isInDst(q.tm, n, t.KeyCopyFromSlice, 1) || isInDst(q.tm, n, t.KeyCopyFromSlice32, 2) ||
isInDst(q.tm, n, t.KeyCopyFromReader32, 2) || isInDst(q.tm, n, t.KeyCopyFromHistory32, 2) ||
isInDst(q.tm, n, t.KeyWriteU8, 1) || isInDst(q.tm, n, t.KeySinceMark, 0) ||
@@ -728,7 +728,7 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
isThisMethod(q.tm, n, "decode_blocks", 2) ||
isThisMethod(q.tm, n, "init_fixed_huffman", 0) || isThisMethod(q.tm, n, "init_dynamic_huffman", 1) ||
isThisMethod(q.tm, n, "init_huff", 4) ||
isThatMethod(q.tm, n, t.KeyMark, 0) || isThatMethod(q.tm, n, t.KeyLimitt, 1) ||
isThatMethod(q.tm, n, t.KeyMark, 0) || isThatMethod(q.tm, n, t.KeyLimit, 1) ||
isThatMethod(q.tm, n, t.KeySinceMark, 0) {
for _, o := range n.Args() {
+4 -4
View File
@@ -427,7 +427,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
isInSrc(q.tm, n, t.KeyReadU16BE, 0) || isInSrc(q.tm, n, t.KeyReadU32BE, 0) ||
isInSrc(q.tm, n, t.KeyReadU32BE, 0) || isInSrc(q.tm, n, t.KeyReadU32LE, 0) ||
isInSrc(q.tm, n, t.KeySkip32, 1) || isInSrc(q.tm, n, t.KeySinceMark, 0) ||
isInSrc(q.tm, n, t.KeyMark, 0) || isInSrc(q.tm, n, t.KeyLimitt, 1) ||
isInSrc(q.tm, n, t.KeyMark, 0) || isInSrc(q.tm, n, t.KeyLimit, 1) ||
isInDst(q.tm, n, t.KeyCopyFromSlice, 1) || isInDst(q.tm, n, t.KeyCopyFromSlice32, 2) ||
isInDst(q.tm, n, t.KeyCopyFromReader32, 2) || isInDst(q.tm, n, t.KeyCopyFromHistory32, 2) ||
isInDst(q.tm, n, t.KeyWriteU8, 1) || isInDst(q.tm, n, t.KeySinceMark, 0) ||
@@ -438,7 +438,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
isThisMethod(q.tm, n, "decode_blocks", 2) ||
isThisMethod(q.tm, n, "init_fixed_huffman", 0) || isThisMethod(q.tm, n, "init_dynamic_huffman", 1) ||
isThisMethod(q.tm, n, "init_huff", 4) ||
isThatMethod(q.tm, n, t.KeyMark, 0) || isThatMethod(q.tm, n, t.KeyLimitt, 1) ||
isThatMethod(q.tm, n, t.KeyMark, 0) || isThatMethod(q.tm, n, t.KeyLimit, 1) ||
isThatMethod(q.tm, n, t.KeySinceMark, 0) {
if err := q.tcheckExpr(n.LHS().Expr(), depth); err != nil {
@@ -658,7 +658,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
func isInSrc(tm *t.Map, n *a.Expr, methodName t.Key, nArgs int) bool {
callSuspendible := methodName != t.KeySinceMark &&
methodName != t.KeyMark &&
methodName != t.KeyLimitt
methodName != t.KeyLimit
if n.ID0().Key() != t.KeyOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false
}
@@ -681,7 +681,7 @@ func isInDst(tm *t.Map, n *a.Expr, methodName t.Key, nArgs int) bool {
methodName != t.KeyCopyFromSlice &&
methodName != t.KeySinceMark &&
methodName != t.KeyMark &&
methodName != t.KeyLimitt
methodName != t.KeyLimit
// TODO: check that n.Args() is "(x:bar)".
if n.ID0().Key() != t.KeyOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false
+3 -3
View File
@@ -300,7 +300,7 @@ const (
KeyAvailable = Key(IDAvailable >> KeyShift)
KeyPrefix = Key(IDPrefix >> KeyShift)
KeySuffix = Key(IDSuffix >> KeyShift)
KeyLimitt = Key(IDLimitt >> KeyShift) // TODO: rename Limitt to Limit.
KeyLimit = Key(IDLimit >> KeyShift)
KeyXUnaryPlus = Key(IDXUnaryPlus >> KeyShift)
KeyXUnaryMinus = Key(IDXUnaryMinus >> KeyShift)
@@ -487,7 +487,7 @@ const (
IDAvailable = ID(0xCA<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
IDPrefix = ID(0xCB<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
IDSuffix = ID(0xCC<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
IDLimitt = ID(0xCD<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
IDLimit = ID(0xCD<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
)
// The IDXFoo IDs are not returned by the tokenizer. They are used by the
@@ -692,7 +692,7 @@ var builtInsByKey = [nBuiltInKeys]struct {
KeyAvailable: {"available", IDAvailable},
KeyPrefix: {"prefix", IDPrefix},
KeySuffix: {"suffix", IDSuffix},
KeyLimitt: {"limitt", IDLimitt},
KeyLimit: {"limit", IDLimit},
}
var builtInsByName = map[string]ID{}
+1 -1
View File
@@ -164,7 +164,7 @@ pri func decoder.decode_id?(dst writer1, src reader1)() {
while true {
var r reader1 = in.src
r.mark()
r.limitt(l:block_size)
r.limit(l:block_size)
// TODO: remove the dummy param. It's needed for now so that
// writeSaveExprDerivedVars updates e.g. the b_rptr_src derived
// variables.