src/syntax/Scanner.js
function scanTemplateStart(beginIndex) {
  if (isAtEnd()) {
    reportError('Unterminated template literal', beginIndex, index);
    return lastToken = createToken(END_OF_FILE, beginIndex);
  }

  return nextTemplateLiteralTokenShared(NO_SUBSTITUTION_TEMPLATE,
                                        TEMPLATE_HEAD);
}
function scanTemplateStart(beginIndex) {
  if (isAtEnd()) {
    reportError('Unterminated template literal', beginIndex, index);
    return lastToken = createToken(END_OF_FILE, beginIndex);
  }

  return nextTemplateLiteralTokenShared(NO_SUBSTITUTION_TEMPLATE,
                                        TEMPLATE_HEAD);
}
function scanTemplateStart ( beginIndex ) { if ( isAtEnd ( ) ) { reportError ( 'Unterminated template literal' , beginIndex , index ) ; return lastToken = createToken ( END_OF_FILE , beginIndex ) ; } return nextTemplateLiteralTokenShared ( NO_SUBSTITUTION_TEMPLATE , TEMPLATE_HEAD ) ; }
Either returns a NO_SUBSTITUTION_TEMPLATE or TEMPLATE_HEAD token.
Either returns a NO_SUBSTITUTION_TEMPLATE or TEMPLATE_HEAD token .