This program:
http://play.golang.org/p/f3VrIs2Z70
parses a syntactically well-formed Go program, inserts an additional statement, then
prints it out again. The result cannot be parsed because a newline was inserted in an
inappropriate place to accommodate a comment. Here's the output:
package P
func f() {
print("12"
/*hi*/)
g(0, 1)
}
Note that the length of the literal "12" is critical: if a shorter expression
is used, the /*hi*/ comment, which is retains its association with its original byte
offset, will not be inserted at that point.