-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
Same as #41197, but for *ast.BasicLit
can happen for raw literal strings.
As per the go spec:
Carriage return characters ('\r') inside raw string literals are discarded from the raw string value.
The End pos is calculated as such:
Line 528 in b521ebb
func (x *BasicLit) End() token.Pos { return token.Pos(int(x.ValuePos) + len(x.Value)) } |
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.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.