On Sat, Jul 06, 2024 at 01:31:05AM -0400, Jeff King wrote: > > > And then ScriptParser::parse_cmd() just has to recognize that any "<<" > > > token isn't interesting, and that "-" means "read the here-doc". > > > > In my implementation, the `<<` token is "interesting" because the > > heredoc tag is attached to it, and the tag is needed to pluck the > > heredoc body from the set of saved bodies (since my implementation > > doesn't assume most-recently-seen body is the correct one). > > Ah, OK. So it would probably not be that big of a deal to record a > single bit for "this heredoc is interpolated". But until we have > anything useful to do with that information, let's not worry about it > for now. Oh, oops. I attached this response to the wrong message (I read them all through before starting to respond). My response here was about the fact that "<<\EOT" does not record the "\" anywhere from the lexer. But yes, for your implementation, we do need to recognize "<<\EOT", etc, to pull out "EOT". -Peff