scanner: Fix detection of zero-length heredoc anchor.
This commit is contained in:
parent
8bad6ac32e
commit
a68b5db4c3
@ -433,7 +433,7 @@ func (s *Scanner) scanHeredoc() {
|
||||
|
||||
// Read the identifier
|
||||
identBytes := s.src[offs : s.srcPos.Offset-s.lastCharLen]
|
||||
if len(identBytes) == 0 {
|
||||
if len(identBytes) == 0 || (len(identBytes) == 1 && identBytes[0] == '-') {
|
||||
s.err("zero-length heredoc anchor")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user