tree-sitter-bash icon indicating copy to clipboard operation
tree-sitter-bash copied to clipboard

Make all quoted here-documents raw and fix tests

Open derekschrock opened this issue 4 years ago • 3 comments

  • "EOF" and \EOF quoted here-docs were not marked as raw.
  • Update test to not expect expansion in quoted here-doc and last here-doc has an empty body.

derekschrock avatar May 03 '20 09:05 derekschrock

last here-doc has an empty body

There still should be a a heredoc_body node even if the body is empty. It seems like something is wrong, and the entire remainder of the file after \EOF is getting parsed as heredoc_start.

maxbrunsfeld avatar May 14 '20 22:05 maxbrunsfeld

I think that needs to be and else if because then \"EOF or \'EOF would be accepted?

derekschrock avatar May 14 '20 23:05 derekschrock

Yes, it might need to be restructured a bit.

maxbrunsfeld avatar May 14 '20 23:05 maxbrunsfeld

@derekschrock @maxbrunsfeld if you both agree, I'd gladly tackle this once #142 is merged.

domq avatar Jan 04 '23 11:01 domq

I'm not sure this is still an issue. "EOF" and \EOF here-docs appear to be raw in vim and coc with bash-language-server that is using wasm built from tree-sitter-bash 4488aa414.

derekschrock avatar Jan 04 '23 16:01 derekschrock

@derekschrock it might be because everyting is raw these days, see Emacs screenshot below ☹

image

domq avatar Jan 04 '23 20:01 domq

oh that's right I do remember that change. Ok yeah please have at it and let me know if you need some testing.

derekschrock avatar Jan 04 '23 20:01 derekschrock