GetErrorHeader() 공개 메소드

What is the error header, normally line/character position information?
public GetErrorHeader ( RecognitionException e ) : string
e RecognitionException
리턴 string
예제 #1
0
        public static SyntaxErrorException Report(BaseRecognizer source, RecognitionException e)
        {
            var input = source.Input.ToString();
            if (source.Input is ANTLRStringStream)
                input = new String((Char[])typeof(ANTLRStringStream).GetField("data", 
                    BindingFlags.NonPublic | BindingFlags.Instance).GetValue(source.Input));

            var antlrMessage = source.GetErrorHeader(e) + " " + source.GetErrorMessage(e, source.TokenNames);
            throw new SyntaxErrorException(input, antlrMessage, e);
        }