HREDOCs with surrounding single quote are ended with the token sans quotes ``` cat << 'EOF' $literal `values` "without" 'interpolation' EOF ``` but `bashlex` expects an end token with the quotes > here-document at line 0 delimited by end-of-file (wanted "'EOF'") (position 16) when trying ``` bashlex.parse(": <<'EOF'\nx\nEOF") ``` ----- ending with the included quotes `'EOF'` works for bashlex but not bash ``` bashlex.parse(": <<'EOF'\nx\n'EOF'") ``` > `[CommandNode(parts=[WordNode(parts=[] pos=(0, 1) word=':'), RedirectNode(heredoc=HeredocNode(pos=(10, 17) value="x\n'EOF'") input=None output=WordNode(parts=[] pos=(4, 9) word="'EOF'") pos=(2, 17) type='<<')] pos=(0, 9))]` ``` bash -c "cat <<'EOF' x 'EOF'" ``` > bash: line 3: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
Activity
[-]single quoted heredoc [/-][+]single quoted heredoc token cannot find end[/+]fix idank#99: implement commented string_quote_removal
fix idank#99: implement commented string_quote_removal
string_quote_removal: rm escaped and double quotes (idank#99)
string_quote_removal: rm escaped and double quotes (idank#99)
string_quote_removal: rm escaped and double quotes (idank#99)