// A heredoc string literal has the form
//
// header
// optional body
// trailer
//
// The header is:
//
// <<< (optional whitespace) name (no whitespace) (newline)
//
// The optional body is:
//
// any characters whatsoever including newlines (newline)
//
// The trailer is:
//
// (no whitespace) name (no whitespace) (optional semi) (no whitespace) (newline)
//
// The names must be identical.  The trailing semi and newline must be present.
//
// The body is any and all characters, up to the first line that exactly matches
// the trailer.
//
// The body may contain embedded expressions.
//
// A nowdoc string literal has the same form except that the first name is
// enclosed in single quotes, and it may not contain embedded expressions.
A heredoc string literal has the form
header
optional body
trailer

The header is.

<<< (optional whitespace) name (no whitespace) (newline)

The optional body is.

any characters whatsoever including newlines (newline)

The trailer is.

(no whitespace) name (no whitespace) (optional semi) (no whitespace) (newline)

The names must be identical.  The trailing semi and newline must be present.

The body is any and all characters, up to the first line that exactly matches
the trailer.

The body may contain embedded expressions.

A nowdoc string literal has the same form except that the first name is
enclosed in single quotes, and it may not contain embedded expressions.
A heredoc string literal has the form header optional body trailer The header is . <<< ( optional whitespace ) name ( no whitespace ) ( newline ) The optional body is . any characters whatsoever including newlines ( newline ) The trailer is . ( no whitespace ) name ( no whitespace ) ( optional semi ) ( no whitespace ) ( newline ) The names must be identical . The trailing semi and newline must be present . The body is any and all characters up to the first line that exactly matches the trailer . The body may contain embedded expressions . A nowdoc string literal has the same form except that the first name is enclosed in single quotes and it may not contain embedded expressions .
fn scan_docstring_name_actual(&mut self) -> &'a [u8] {
        let ch = self.peek_char(0);
        if Self::is_name_nondigit(ch) {
            let start_offset = self.offset();
            self.advance(1);
            self.skip_name_end();
            self.source.sub(start_offset, self.offset() - start_offset)
        } else {
            self.with_error(Errors::error0008);
            b""
        }
    }
fn scan_docstring_name_actual ( & mut self ) -> & ' a [ u8 ] { let ch = self . peek_char ( 0 ) ; if Self :: is_name_nondigit ( ch ) { let start_offset = self . offset ( ) ; self . advance ( 1 ) ; self . skip_name_end ( ) ; self . source . sub ( start_offset , self . offset ( ) - start_offset ) } else { self . with_error ( Errors :: error0008 ) ; b" " } }
A heredoc string literal has the form
header
optional body
trailer
A heredoc string literal has the form header optional body trailer
&mut self