Closed
Description
https://go-review.googlesource.com/c/go/+/398475 and its issue #52165 are triggered by an inability to do sufficient lookahead, but that should be easy to do(but isn't) as the lexer operates on the full string. The submitted fix is clumsy but should be as easy as a call to strings.HasPrefix
, and I want to make it that easy.
The lexer in robpike.io/ivy originated with this code but has been updated to avoid this problem. Do the same to text/template/parse. The required changes are modest and will not affect the public interface.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]tex/template/parse: give the lexer more lookahead[/-][+]text/template/parse: give the lexer more lookahead[/+]gopherbot commentedon May 15, 2022
Change https://go.dev/cl/406476 mentions this issue:
text/template/parse: make atTerminator more efficient
text/template/parse: make atTerminator more efficient