]> Cypherpunks repositories - gostls13.git/commitdiff
allow &^= in assignments
authorRobert Griesemer <gri@golang.org>
Thu, 4 Jun 2009 20:43:19 +0000 (13:43 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 4 Jun 2009 20:43:19 +0000 (13:43 -0700)
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29889
CL=29889

src/lib/go/parser/parser.go

index 622268d1ec82d607cc38a88762cb44ee7419beb6..05686869560eff7fd57013a1b11ebad329e24f5e 100644 (file)
@@ -155,7 +155,7 @@ func (p *parser) collectComment() int {
        // as there may be more whitespace lines after the comment.)
        endline := p.pos.Line;
        if p.lit[1] == '*' {
-               for i, b := range p.lit {
+               for _, b := range p.lit {
                        if b == '\n' {
                                endline++;
                        }
@@ -1240,7 +1240,7 @@ func (p *parser) parseSimpleStmt(label_ok bool) ast.Stmt {
                token.DEFINE, token.ASSIGN, token.ADD_ASSIGN,
                token.SUB_ASSIGN, token.MUL_ASSIGN, token.QUO_ASSIGN,
                token.REM_ASSIGN, token.AND_ASSIGN, token.OR_ASSIGN,
-               token.XOR_ASSIGN, token.SHL_ASSIGN, token.SHR_ASSIGN:
+               token.XOR_ASSIGN, token.SHL_ASSIGN, token.SHR_ASSIGN, token.AND_NOT_ASSIGN:
                // assignment statement
                pos, tok := p.pos, p.tok;
                p.next();