anchor.diff:              if (token.type === this.HereDocText) {
                   if (this.CheckHeredocEnd(token.text)) {
                       this.popMode()
  +                    const heredocIdentifier = this.GetHeredocEnd(token.text)
                       if (token.text.trim().endsWith(';')) {
  -                        token = CommonToken(type=this.SemiColon);
  -                        token.text = ';';
  +                        token = new CommonToken(CommonToken.EMPTY_SOURCE, type=this.SemiColon);
  +                        token.text = `${heredocIdentifier};\n`;
                       } else {
                           token = antlr4.Lexer.prototype.nextToken.call(this);
  +                        token.text = `${heredocIdentifier}\n;`;
                       }
                   }
               }
  
positive.code:         return token;
      };
  
      PhpLexer.prototype.CheckHeredocEnd = function(text) {
          const identifier = text.trim().replace(/\;$/, "");
          return identifier === _heredocIdentifier;
      };
  
  }
  
negative.code: 	| '\uFDF0' ..'\uFFFD';
  fragment ExponentPart: 'e' [+-]? Digit+;
  fragment Digit: [0-9];
  fragment HexDigit: [a-fA-F0-9];