107 references to Position
Microsoft.CodeAnalysis.CSharp (107)
Parser\Blender.cs (1)
69_newPosition = lexer.TextWindow.Position;
Parser\Blender.Reader.cs (1)
165if (_lexer.TextWindow.Position != _newPosition)
Parser\DirectiveParser.cs (1)
36var hashPosition = lexer.TextWindow.Position;
Parser\LanguageParser.cs (1)
220return CreateForGlobalFailure(lexer.TextWindow.Position, createEmptyNodeFunc(this));
Parser\Lexer.cs (33)
306this.LexSyntaxTrivia(isFollowingToken: TextWindow.Position > 0, isTrailing: false, triviaList: ref _leadingTriviaCache); 325this.LexSyntaxTrivia(isFollowingToken: TextWindow.Position > 0, isTrailing: false, triviaList: ref _leadingTriviaCache); 445int startingPosition = TextWindow.Position; 464var atDotPosition = this.TextWindow.Position; 637this.AddError(TextWindow.Position + 1, width: 1, ErrorCode.ERR_ExpectedVerbatimLiteral); 807int start = TextWindow.Position; 813return start < TextWindow.Position; 862int start = TextWindow.Position; 1040this.AddError(MakeError(start, TextWindow.Position - start, ErrorCode.ERR_InvalidNumber)); 1065info.DecimalValue = this.GetValueDecimal(valueText, start, TextWindow.Position); 1443int start = TextWindow.Position; 1451var atCount = TextWindow.Position - start; 1658int start = TextWindow.Position; 1677int beforeConsumed = TextWindow.Position; 1712if (!isEscaped && (TextWindow.Position == beforeConsumed + 1) && 1974this.AddError(TextWindow.Position, width: 1, ErrorCode.ERR_UnexpectedCharacter, '@'); 2005var savePosition = TextWindow.Position; 2011var text = TextWindow.Text.GetSubText(TextSpan.FromBounds(savePosition, TextWindow.Position)); 2085var position = TextWindow.Position; 2119this.AddError(TextWindow.Position, s_conflictMarkerLength, 2443int lastLineStart = TextWindow.Position; 2463if (lastLineStart < TextWindow.Position && !allWhitespace) 2473lastLineStart = TextWindow.Position; 2722var pos = TextWindow.Position; 3313int start = TextWindow.Position; 3337info.Text = TextWindow.GetText(start, TextWindow.Position - start, intern: true); 3611int beforeConsumed = TextWindow.Position; 3687Debug.Assert(TextWindow.Position > beforeConsumed, "First character or entity has been consumed."); 3910int pos = TextWindow.Position; 4369var start = TextWindow.Position; 4597int position = TextWindow.Position; 4636int start = TextWindow.Position; 4843TextWindow.Position - start,
Parser\Lexer_RawStringLiteral.cs (16)
19var start = TextWindow.Position; 23return TextWindow.Position - start; 91var valueLength = TextWindow.Position - afterStartDelimiter; 137this.AddError(TextWindow.Position, width: TextWindow.GetNewLineWidth(), ErrorCode.ERR_UnterminatedRawString); 142this.AddError(TextWindow.Position, width: 0, ErrorCode.ERR_UnterminatedRawString); 153var beforeEndDelimiter = TextWindow.Position; 166position: TextWindow.Position - excessQuoteCount, 196var afterStartDelimiter = TextWindow.Position; 211position: TextWindow.Position - startingQuoteCount, 222var tokenEnd = TextWindow.Position; 269position: TextWindow.Position - excessQuoteCount, 285this.AddError(TextWindow.Position, width: 0, ErrorCode.ERR_UnterminatedRawString); 299position: TextWindow.Position - currentQuoteCount, 329var lineStartPosition = TextWindow.Position; 352width: TextWindow.Position - lineStartPosition, 360width: TextWindow.Position - lineStartPosition,
Parser\Lexer_StringLiteral.cs (47)
131var start = TextWindow.Position; 157this.AddError(start, TextWindow.Position - start, info.Code, info.Arguments); 185this.AddError(start, TextWindow.Position - start, ErrorCode.ERR_IllegalEscape); 197var start = TextWindow.Position; 203if (TextWindow.Position - start >= 2) 205this.AddError(start, width: TextWindow.Position - start, ErrorCode.ERR_IllegalAtSequence); 381var start = _lexer.TextWindow.Position; 383Debug.Assert(_lexer.TextWindow.Position != start); 385openQuoteRange = start.._lexer.TextWindow.Position; 391closeQuoteRange = _lexer.TextWindow.Position.._lexer.TextWindow.Position; 415var start = window.Position; 464TrySetError(_lexer.MakeError(start, window.Position - start, ErrorCode.ERR_StringMustStartWithQuoteCharacter)); 475TrySetError(_lexer.MakeError(start, window.Position - start, ErrorCode.ERR_IllegalAtSequence)); 481TrySetError(_lexer.MakeError(window.Position - startingQuoteCount, startingQuoteCount, ErrorCode.ERR_NotEnoughQuotesForRawString)); 486var afterQuotePosition = window.Position; 510var closeQuotePosition = _lexer.TextWindow.Position; 524closeQuoteRange = closeQuotePosition.._lexer.TextWindow.Position; 538IsAtEnd(allowNewline: true) ? _lexer.TextWindow.Position - 1 : _lexer.TextWindow.Position, 561IsAtEnd(allowNewline: true) ? _lexer.TextWindow.Position - 1 : _lexer.TextWindow.Position, 579position: _lexer.TextWindow.Position - excessQuoteCount, 596_lexer.TextWindow.Position - 1, width: 1, ErrorCode.ERR_UnterminatedRawString)); 607position: _lexer.TextWindow.Position - closeQuoteCount, 626position: _lexer.TextWindow.Position - excessQuoteCount, 678var escapeStart = _lexer.TextWindow.Position; 682TrySetError(_lexer.MakeError(escapeStart, _lexer.TextWindow.Position - escapeStart, ErrorCode.ERR_EscapedCurly, ch)); 705var beforeQuotesPosition = _lexer.TextWindow.Position; 713_lexer.TextWindow.Position - closeQuoteCount, closeQuoteCount, ErrorCode.ERR_RawStringMustContainContent)); 728var startPosition = _lexer.TextWindow.Position; 783var beforeQuotePosition = _lexer.TextWindow.Position; 803var pos = _lexer.TextWindow.Position; 829position: _lexer.TextWindow.Position - closeBraceCount, 857int openBracePosition = _lexer.TextWindow.Position; 860int closeBracePosition = _lexer.TextWindow.Position; 873new Range(closeBracePosition, _lexer.TextWindow.Position))); 886var beforeOpenBracesPosition = _lexer.TextWindow.Position; 894var afterOpenBracePosition = _lexer.TextWindow.Position; 908var beforeCloseBracePosition = _lexer.TextWindow.Position; 937beforeCloseBracePosition.._lexer.TextWindow.Position)); 961var pos = _lexer.TextWindow.Position; 982_lexer.TextWindow.Position, 1, ErrorCode.ERR_UnexpectedCharacter, ch)); 1022TrySetError(_lexer.MakeError(_lexer.TextWindow.Position, 1, ErrorCode.ERR_SyntaxError, endingChar.ToString())); 1040colonRange = new Range(_lexer.TextWindow.Position, _lexer.TextWindow.Position + 1); 1054TrySetError(_lexer.MakeError(_lexer.TextWindow.Position, 1, ErrorCode.ERR_SyntaxError, endingChar.ToString()));
Parser\SlidingTextWindow.cs (3)
201if (this.Position >= _textEnd) 253return _offset >= _characterWindowCount && Position >= _textEnd; 358int position = this.Position;
Syntax\SyntaxTokenParser.cs (4)
54var startingPosition = _lexer.TextWindow.Position; 68var startingPosition = _lexer.TextWindow.Position; 83var startingPosition = _lexer.TextWindow.Position; 96if (position < _lexer.TextWindow.Position)