예제 #1
0
 public Token(LexerPosition start, LexerPosition end, TokenType type, object value)
 {
     StartPosition = start;
     EndPosition   = end;
     TokenType     = type;
     Value         = value;
     if (value is string str)
     {
         StringValue = str;
     }
     if (value is int i)
     {
         IntValue = i;
     }
     if (value is double d)
     {
         DoubleValue = d;
     }
 }
예제 #2
0
        private void ReadComment()
        {
            int position = _currentPosition;

            while ((++position) < _text.Length)
            {
                if (_text[position] == '\n' || _text[position] == '\r')
                {
                    break;
                }
            }

            int diff = (position - _currentPosition);

            _currentPosition = position;
            _column         += diff;
            CurrentTokenEnd  = new LexerPosition(_line, _column - 1);

            _currentStringValue = null;
            _currentTokenType   = TokenType.Comment;
        }
예제 #3
0
 public GraphQueryParseException(string message, LexerPosition position)
     : base(message)
 {
     ErrorPosition = position;
 }
예제 #4
0
 public GraphQueryLexerException(string message, LexerPosition lexerPosition)
     : base(message)
 {
 }