• Rob Pike's avatar
    text/template: fix a couple of parse bugs around identifiers. · 8170d81f
    Rob Pike authored
    1) Poor error checking in variable declarations admitted
    $x=2 or even $x%2.
    2) Need white space or suitable termination character
    after identifiers, so $x+2 doesn't parse, in case we want it
    to mean something one day.
    Number 2 in particular prevents mistakes that we will have
    to honor later and so is necessary for Go 1.
    
    Fixes #3270.
    Fixes #3271.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/5795073
    8170d81f
multi_test.go 7.19 KB