Open mateusz834 opened 3 hours ago
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
CC @griesemer @adonovan
Change https://go.dev/cl/619835 mentions this issue: go/ast: document invalid raw string literal end position containing carriage returns
Same as #41197, but for
*ast.BasicLit
can happen for raw literal strings.As per the go spec:
The End pos is calculated as such:
https://github.com/golang/go/blob/b521ebb55a9b26c8824b219376c7f91f7cda6ec2/src/go/ast/ast.go#L528
We are not storing the end pos in the
*ast.BasicLit
, so it might be not accurate for raw string literals containing carriage returns.I think that same as in #41197, we should only document that.