852 references to CurrentToken
Microsoft.CodeAnalysis.VisualBasic (852)
Parser\BlockContexts\BlockContext.vb (1)
439If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\ExecutableStatementContext.vb (1)
208Dim kind = Parser.CurrentToken.Kind
Parser\BlockContexts\IfPartContext.vb (1)
78If Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\SingleLineElseContext.vb (3)
32If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then 81Dim token = Parser.CurrentToken 104Dim token = Parser.CurrentToken
Parser\BlockContexts\SingleLineIfBlockContext.vb (3)
32If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then 87Dim token = Parser.CurrentToken 106Dim token = Parser.CurrentToken
Parser\BlockContexts\SingleLineLambdaContext.vb (1)
71Dim token = Parser.CurrentToken
Parser\ParseConditional.vb (44)
24If CurrentToken.Kind = SyntaxKind.DateLiteralToken OrElse 25CurrentToken.Kind = SyntaxKind.BadToken Then 28missingHash = missingHash.AddLeadingSyntax(New CodeAnalysis.Syntax.InternalSyntax.SyntaxList(Of SyntaxToken)(CurrentToken)) 33Debug.Assert(CurrentToken.Kind = SyntaxKind.HashToken, "Conditional compilation lines start with '#'.") 38Dim hashToken = DirectCast(CurrentToken, PunctuationSyntax) 41Select Case CurrentToken.Kind 68Select Case DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind 113Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseKeyword) 115Dim elseKeyword = DirectCast(CurrentToken, KeywordSyntax) 118If CurrentToken.Kind <> SyntaxKind.IfKeyword Then 133Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseIfKeyword) 140Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword OrElse CurrentToken.Kind = SyntaxKind.ElseIfKeyword) 142Dim ifKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 152If CurrentToken.Kind = SyntaxKind.ThenKeyword Then 153thenKeyword = DirectCast(CurrentToken, KeywordSyntax) 169Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword) 171Dim endKeyword = DirectCast(CurrentToken, KeywordSyntax) 176If CurrentToken.Kind = SyntaxKind.IfKeyword Then 178Dim ifKeyword = DirectCast(CurrentToken, KeywordSyntax) 183ElseIf CurrentToken.Kind = SyntaxKind.IdentifierToken Then 185Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 188Dim regionKeyword = _scanner.MakeKeyword(DirectCast(CurrentToken, IdentifierTokenSyntax)) 194Dim externalSourceKeyword = _scanner.MakeKeyword(DirectCast(CurrentToken, IdentifierTokenSyntax)) 211Debug.Assert(CurrentToken.Kind = SyntaxKind.EndIfKeyword) 213Dim endIfKeyword = DirectCast(CurrentToken, KeywordSyntax) 226Debug.Assert(CurrentToken.Kind = SyntaxKind.ConstKeyword) 228Dim constKeyword = DirectCast(CurrentToken, KeywordSyntax) 256Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.RegionKeyword, 259Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 270Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ExternalSourceKeyword, 273Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 317Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ExternalChecksumKeyword, 320Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 385Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken, 387Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 403If Not SyntaxFacts.IsTerminator(CurrentToken.Kind) Then 416If SyntaxFacts.IsTerminator(CurrentToken.Kind) Then 449Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ReferenceKeyword, 452Dim identifier = DirectCast(CurrentToken, IdentifierTokenSyntax)
Parser\ParseExpression.vb (96)
63Dim startToken As SyntaxToken = CurrentToken 134If Not CurrentToken.IsBinaryOperator Then 139Not IsValidOperatorForConditionalCompilationExpr(CurrentToken) Then 146precedence = KeywordTable.TokenOpPrec(CurrentToken.Kind) 184StartsValidConditionalCompilationExpr(CurrentToken), "Conditional compilation expression parsing confused!!!") 187Dim start As SyntaxToken = CurrentToken 243If CurrentToken.Kind <> SyntaxKind.DotToken Then 253If CurrentToken.Kind <> SyntaxKind.DotToken Then 263If CurrentToken.Kind <> SyntaxKind.DotToken Then 303term = term.AddTrailingSyntax(CurrentToken, ERRID.ERR_FullWidthAsXmlDelimiter) 330term = SyntaxFactory.TrueLiteralExpression(CurrentToken) 334term = SyntaxFactory.FalseLiteralExpression(CurrentToken) 338term = SyntaxFactory.NothingLiteralExpression(CurrentToken) 444If CurrentToken IsNot Nothing AndAlso CurrentToken.Kind = SyntaxKind.QuestionToken Then 445term = term.AddTrailingSyntax(CurrentToken, ERRID.ERR_NullableCharNotSupported) 454Dim [Next] As SyntaxToken = CurrentToken 490Select Case CurrentToken.Kind 550Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword) 551Dim IfStart = DirectCast(CurrentToken, KeywordSyntax) 555If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 641Debug.Assert(CurrentToken.Kind = SyntaxKind.GetTypeKeyword, "should be at GetType.") 643Dim [getType] As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 672Debug.Assert(CurrentToken.Kind = SyntaxKind.NameOfKeyword, "should be at NameOf.") 674Dim [nameOf] As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 733Debug.Assert(CurrentToken.Kind = SyntaxKind.GetXmlNamespaceKeyword, "should be at GetXmlNamespace.") 735Dim getXmlNamespaceKeyword = DirectCast(CurrentToken, KeywordSyntax) 738If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 745If CurrentToken.Kind = SyntaxKind.XmlNameToken Then 746name = SyntaxFactory.XmlPrefixName(DirectCast(CurrentToken, XmlNameTokenSyntax)) 772Debug.Assert(SyntaxFacts.IsPredefinedCastExpressionKeyword(CurrentToken.Kind), "ParseCastExpression called with the wrong token.") 774Dim Start = DirectCast(CurrentToken, KeywordSyntax) 793Debug.Assert(CurrentToken.Kind = SyntaxKind.NewKeyword, "must be at a New expression.") 795Dim NewKeyword = DirectCast(CurrentToken, KeywordSyntax) 798If CurrentToken.Kind = SyntaxKind.WithKeyword Then 814If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 834If Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.OpenParenToken Then 840ElseIf CurrentToken.Kind = SyntaxKind.OpenBraceToken Then 869If TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.FromKeyword, FromToken) Then 887If (CurrentToken.Kind = SyntaxKind.WithKeyword) Then 897If CurrentToken.Kind = SyntaxKind.WithKeyword Then 901If (CurrentToken.Kind = SyntaxKind.WithKeyword) Then 907If TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.FromKeyword, FromToken) AndAlso 926Debug.Assert(CurrentToken.Kind = SyntaxKind.TypeOfKeyword, "must be at TypeOf.") 927Dim [typeOf] As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 940Dim current As SyntaxToken = CurrentToken 1000Debug.Assert(CurrentToken.Kind = SyntaxKind.DotToken OrElse 1001CurrentToken.Kind = SyntaxKind.ExclamationToken, 1004Dim DotOrBangToken As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1013If (CurrentToken.IsEndOfLine() AndAlso Not CurrentToken.IsEndOfParse()) Then 1015Debug.Assert(CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso 1048Select Case (CurrentToken.Kind) 1051Dim atToken = DirectCast(CurrentToken, PunctuationSyntax) 1094Dim secondDotToken = DirectCast(CurrentToken, PunctuationSyntax) 1102If CurrentToken.Kind = SyntaxKind.LessThanToken Then 1124If CurrentToken.Kind = SyntaxKind.AtToken Then 1225Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 1234If (CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 1249If (CurrentToken.Kind = SyntaxKind.CommaToken) Then 1266While CurrentToken.Kind = SyntaxKind.CommaToken 1273If (CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 1313Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be at tkLParen.") 1319Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 1338closeParen = DirectCast(CurrentToken, PunctuationSyntax) 1400If (CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.IsKeyword()) AndAlso 1421ElseIf CurrentToken.Kind = SyntaxKind.CommaToken Then 1429ElseIf CurrentToken.Kind = SyntaxKind.CloseParenToken Then 1446ElseIf CurrentToken.Kind = SyntaxKind.CloseParenToken OrElse MustEndStatement(CurrentToken) Then 1457If CurrentToken.Kind = SyntaxKind.CommaToken Then 1458comma = DirectCast(CurrentToken, PunctuationSyntax) 1501If (CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.IsKeyword()) AndAlso 1518If CurrentToken.Kind <> SyntaxKind.CommaToken Then 1519If CurrentToken.Kind = SyntaxKind.CloseParenToken OrElse MustEndStatement(CurrentToken) Then 1529If CurrentToken.Kind <> SyntaxKind.CommaToken Then 1558If RedimOrNewParent AndAlso CurrentToken.Kind = SyntaxKind.ToKeyword Then 1559Dim toKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1587Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1649Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken) 1661Debug.Assert(CurrentToken.Kind = SyntaxKind.FunctionKeyword OrElse 1662CurrentToken.Kind = SyntaxKind.SubKeyword, 1666Dim methodKeyword = DirectCast(CurrentToken, KeywordSyntax) 1676If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 1680If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 1703If CurrentToken.Kind = SyntaxKind.AsKeyword Then 1704asKeyword = DirectCast(CurrentToken, KeywordSyntax) 1707If CurrentToken.Kind = SyntaxKind.LessThanToken Then 1729isMultiLine = isMultiLine OrElse CurrentToken.Kind = SyntaxKind.StatementTerminatorToken 1785If isMultiLine OrElse CurrentToken.Kind = SyntaxKind.ColonToken Then 1793If CurrentToken.IsEndOfParse() Then 1892Debug.Assert(DirectCast(CurrentToken, IdentifierTokenSyntax).ContextualKind = SyntaxKind.AwaitKeyword) 1895TryIdentifierAsContextualKeyword(CurrentToken, awaitKeyword)
Parser\ParseInterpolatedString.vb (32)
18Debug.Assert(CurrentToken.Kind = SyntaxKind.DollarSignDoubleQuoteToken, "ParseInterpolatedStringExpression called on the wrong token.") 22Debug.Assert(CurrentToken.Kind = SyntaxKind.DollarSignDoubleQuoteToken, "Rescanning $"" failed.") 24Dim dollarSignDoubleQuoteToken = DirectCast(CurrentToken, PunctuationSyntax) 34Select Case CurrentToken.Kind 37Dim textToken = DirectCast(CurrentToken, InterpolatedStringTextTokenSyntax) 42Debug.Assert(CurrentToken.Kind <> SyntaxKind.InterpolatedStringTextToken, 58skipped.Add(CurrentToken) 64doubleQuoteToken = DirectCast(CurrentToken, PunctuationSyntax) 101Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenBraceToken, "ParseInterpolatedStringEmbeddedExpression called on the wrong token.") 106Dim openBraceToken = DirectCast(CurrentToken, PunctuationSyntax) 111If CurrentToken.Kind = SyntaxKind.ColonToken Then 120If CurrentToken.Kind = SyntaxKind.ColonToken Then 127If CurrentToken.Kind = SyntaxKind.CommaToken Then 130Dim commaToken = DirectCast(CurrentToken, PunctuationSyntax) 133If CurrentToken.Kind = SyntaxKind.ColonToken Then 139If CurrentToken.Kind = SyntaxKind.MinusToken OrElse 140CurrentToken.Kind = SyntaxKind.PlusToken Then 142signTokenOpt = DirectCast(CurrentToken, PunctuationSyntax) 145If CurrentToken.Kind = SyntaxKind.ColonToken Then 154If CurrentToken.Kind = SyntaxKind.IntegerLiteralToken Then 156widthToken = DirectCast(CurrentToken, IntegerLiteralTokenSyntax) 159If CurrentToken.Kind = SyntaxKind.ColonToken Then 182If CurrentToken.Kind = SyntaxKind.ColonToken AndAlso colonToken IsNot Nothing Then 189If CurrentToken.Kind = SyntaxKind.InterpolatedStringTextToken Then 190formatStringToken = DirectCast(CurrentToken, InterpolatedStringTextTokenSyntax) 224If CurrentToken.Kind = SyntaxKind.ColonToken Then 232If CurrentToken.Kind = SyntaxKind.CloseBraceToken Then 237closeBraceToken = DirectCast(CurrentToken, PunctuationSyntax) 240ElseIf CurrentToken.Kind = SyntaxKind.EndOfInterpolatedStringToken Then 246If Not IsValidStatementTerminator(CurrentToken) Then 250Debug.Assert(CurrentToken.Kind <> SyntaxKind.CloseBraceToken) 253If CurrentToken.Kind = SyntaxKind.InterpolatedStringTextToken Then
Parser\ParseQuery.vb (51)
19If ((CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.IsKeyword()) AndAlso 30Debug.Assert(CurrentToken.Kind = SyntaxKind.EqualsToken) 32Equals = DirectCast(CurrentToken, PunctuationSyntax) 66If CurrentToken.Kind = SyntaxKind.CommaToken Then 67Dim comma = DirectCast(CurrentToken, PunctuationSyntax) 88If CurrentToken.Kind = SyntaxKind.IdentifierToken Then 89Dim curIdent = DirectCast(CurrentToken, IdentifierTokenSyntax) 103If Not aggName.ContainsDiagnostics AndAlso CurrentToken.Kind = SyntaxKind.OpenParenToken Then 104Dim lParen = DirectCast(CurrentToken, PunctuationSyntax) 110If CurrentToken.Kind <> SyntaxKind.CloseParenToken Then 145If Not CurrentToken.IsBinaryOperator AndAlso 146CurrentToken.Kind <> SyntaxKind.DotToken Then 159If CurrentToken.Kind = SyntaxKind.QuestionToken Then 160Dim unexpectedNullable As SyntaxToken = CurrentToken 176If ((CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.IsKeyword()) AndAlso 185Debug.Assert(CurrentToken.Kind = SyntaxKind.EqualsToken) 187Equals = DirectCast(CurrentToken, PunctuationSyntax) 194If CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.IsKeyword() Then 196If TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.GroupKeyword, groupKw) AndAlso 263If CurrentToken.Kind = SyntaxKind.CommaToken Then 264Dim comma = DirectCast(CurrentToken, PunctuationSyntax) 312If CurrentToken.Kind = SyntaxKind.QuestionToken AndAlso 316Dim unexpectedNullable As SyntaxToken = CurrentToken 326If CurrentToken.Kind = SyntaxKind.AsKeyword Then 327Dim AsKw As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 333If CurrentToken.Kind = SyntaxKind.InKeyword Then 433If CurrentToken.Kind = SyntaxKind.QuestionToken AndAlso 437Dim unexpectedNullable As SyntaxToken = CurrentToken 447If CurrentToken.Kind = SyntaxKind.AsKeyword Then 448Dim AsKw As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 454If CurrentToken.Kind = SyntaxKind.InKeyword Then 539Debug.Assert(CurrentToken.Text = contextualKeyword.Text) 786If CurrentToken.Kind = SyntaxKind.QuestionToken AndAlso 789Dim unexpectedNullable As SyntaxToken = CurrentToken 797If CurrentToken.Kind = SyntaxKind.AsKeyword Then 798Dim AsKw As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 866If CurrentToken.Kind <> SyntaxKind.StatementTerminatorToken Then 913ElseIf CurrentToken.Kind = SyntaxKind.AndAlsoKeyword OrElse 914CurrentToken.Kind = SyntaxKind.OrKeyword OrElse 915CurrentToken.Kind = SyntaxKind.OrElseKeyword Then 917Exprs(Exprs.Count - 1) = Exprs(Exprs.Count - 1).AddTrailingSyntax(CurrentToken, ERRID.ERR_ExpectedAnd) 1043Dim Start = CurrentToken 1057Start = CurrentToken 1090If CurrentToken.Kind = SyntaxKind.WhileKeyword Then 1092Dim whileKw = DirectCast(CurrentToken, KeywordSyntax) 1104If CurrentToken.Kind = SyntaxKind.WhileKeyword Then 1106Dim whileKw = DirectCast(CurrentToken, KeywordSyntax) 1144If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken Then
Parser\Parser.vb (267)
100Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Generic parameter parsing lost!!!") 113CurrentToken.Kind <> SyntaxKind.DotToken AndAlso 175If CurrentToken.Kind = SyntaxKind.GlobalKeyword Then 177result = SyntaxFactory.GlobalName(DirectCast(CurrentToken, KeywordSyntax)) 466If CurrentToken.IsEndOfParse Then 480Dim terminator = DirectCast(CurrentToken, PunctuationSyntax) 507While CurrentToken.Kind <> SyntaxKind.EndOfFileToken 508builder.Add(CurrentToken) 536Loop While _context.Level > methodContext.Level AndAlso Not CurrentToken.IsEndOfParse 558Dim result As SyntaxToken = CurrentToken 561If CurrentToken.Kind = SyntaxKind.GreaterThanToken AndAlso 572ElseIf CurrentToken.Kind = SyntaxKind.EqualsToken Then 595CodeAnalysis.Syntax.InternalSyntax.SyntaxList.List(CurrentToken, nextToken), ERRID.ERR_ExpectedRelational) 654Select Case CurrentToken.Kind 757Debug.Assert(False, "Unexpected terminator: " & CurrentToken.Kind.ToString()) 761If IsFirstStatementOnLine(CurrentToken) Then 774If TryIdentifierAsContextualKeyword(CurrentToken, contextualKind) Then 846Dim idf = CurrentToken 909Select Case CurrentToken.Kind 1031If Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.LessThanToken Then 1043Select Case CurrentToken.Kind 1059If TryIdentifierAsContextualKeyword(CurrentToken, contextualKind) Then 1079If IsFirstStatementOnLine(CurrentToken) Then 1095If TryIdentifierAsContextualKeyword(CurrentToken, contextualKind) Then 1179Debug.Assert(False, "Unexpected terminator: " & CurrentToken.Kind.ToString()) 1228If CanFollowStatement(CurrentToken) Then 1245Debug.Assert(CurrentToken.Kind = SyntaxKind.EmptyToken) 1246Dim emptyToken = DirectCast(CurrentToken, PunctuationSyntax) 1269If Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.LessThanToken Then 1288Select Case (CurrentToken.Kind) 1298If TryIdentifierAsContextualKeyword(CurrentToken, keyword) Then 1400ElseIf modifiers.Any AndAlso CurrentToken.IsKeyword Then 1438Debug.Assert(CurrentToken.Kind = SyntaxKind.EnumKeyword, "ParseEnumStatement called on the wrong token.") 1440Dim enumKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1447If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 1457If CurrentToken.Kind = SyntaxKind.AsKeyword Then 1458Dim asKeyword = DirectCast(CurrentToken, KeywordSyntax) 1560Dim typeKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1587If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 1639Debug.Assert(CurrentToken.Kind = SyntaxKind.NamespaceKeyword, "ParseNamespaceStatement called on the wrong token.") 1641Dim namespaceKeyword As KeywordSyntax = ReportModifiersOnStatementError(ERRID.ERR_SpecifiersInvalidOnInheritsImplOpt, attributes, Specifiers, DirectCast(CurrentToken, KeywordSyntax)) 1677Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseEndStatement called on wrong token.") 1714Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseGroupEndStatement called on wrong token.") 1716Dim endKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1937Dim t As SyntaxToken = CurrentToken 1985If TryTokenAsContextualKeyword(CurrentToken, possibleKeyword) Then 2190If CurrentToken.Kind = SyntaxKind.AsKeyword Then 2191asKeyword = DirectCast(CurrentToken, KeywordSyntax) 2197If CurrentToken.Kind = SyntaxKind.NewKeyword Then 2198newKeyword = DirectCast(CurrentToken, KeywordSyntax) 2201If isProperty AndAlso CurrentToken.Kind = SyntaxKind.LessThanToken Then 2205If CurrentToken.Kind = SyntaxKind.WithKeyword Then 2214If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 2226If TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.FromKeyword, fromKeyword) Then 2246If isProperty AndAlso CurrentToken.Kind = SyntaxKind.LessThanToken Then 2289If CurrentToken.Kind = SyntaxKind.WithKeyword Then 2294Dim withKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 2313If CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso TryIdentifierAsContextualKeyword(CurrentToken, possibleKeyword) Then 2368If CurrentToken.Kind <> SyntaxKind.CloseBraceToken Then 2407If CurrentToken.Kind <> SyntaxKind.CloseBraceToken Then 2432Debug.Assert(CurrentToken.Kind = SyntaxKind.WithKeyword, "ParseObjectInitializerList called with wrong token") 2437Dim withKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 2464If CurrentToken.Kind <> SyntaxKind.CloseBraceToken AndAlso 2465CurrentToken.Kind <> SyntaxKind.StatementTerminatorToken AndAlso 2466CurrentToken.Kind <> SyntaxKind.ColonToken Then 2529If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso PeekToken(1).Kind = SyntaxKind.OpenBraceToken Then 2556TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.KeyKeyword, optionalKey) Then 2560If CurrentToken.Kind = SyntaxKind.DotToken Then 2561dot = DirectCast(CurrentToken, PunctuationSyntax) 2566If SyntaxKind.QuestionToken = CurrentToken.Kind Then 2567id = id.AddTrailingSyntax(CurrentToken) 2574If CurrentToken.Kind = SyntaxKind.EqualsToken Then 2575equals = DirectCast(CurrentToken, PunctuationSyntax) 2672Dim identifierStart As SyntaxToken = CurrentToken 2731If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 2795Dim Start As SyntaxToken = CurrentToken 2871If SyntaxKind.QuestionToken = CurrentToken.Kind Then 2874typeName = typeName.AddTrailingSyntax(CurrentToken, ERRID.ERR_BadNullTypeInCCExpression) 2886Dim questionMark As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 2908If CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 2909(DirectCast(CurrentToken, IdentifierTokenSyntax).TypeCharacter <> TypeCharacter.None OrElse 2945ElseIf CurrentToken.Kind = SyntaxKind.CloseParenToken OrElse MustEndStatement(CurrentToken) Then 2956If CurrentToken.Kind = SyntaxKind.CommaToken Then 2957commaToken = DirectCast(CurrentToken, PunctuationSyntax) 3034Dim start As SyntaxToken = CurrentToken 3056If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 3100Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Generic arguments parsing lost!!!") 3102openParen = DirectCast(CurrentToken, PunctuationSyntax) 3116If CurrentToken.Kind = SyntaxKind.CommaToken OrElse CurrentToken.Kind = SyntaxKind.CloseParenToken Then 3172Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be a (.") 3182Debug.Assert(Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.OpenParenToken) 3185If CurrentToken.Kind = SyntaxKind.CommaToken Then 3189ElseIf CurrentToken.Kind <> SyntaxKind.CloseParenToken Then 3211Loop While CurrentToken.Kind = SyntaxKind.OpenParenToken 3229Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be a (.") 3244Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 3247If CurrentToken.Kind = SyntaxKind.CommaToken Then 3251ElseIf CurrentToken.Kind <> SyntaxKind.CloseParenToken Then 3284Loop While CurrentToken.Kind = SyntaxKind.OpenParenToken 3325While CurrentToken.Kind = kind 3326Dim sep As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 3352ElseIf CurrentToken.Kind = SyntaxKind.ToKeyword Then 3353toKeyword = DirectCast(CurrentToken, KeywordSyntax) 3393Debug.Assert(CurrentToken.Kind = SyntaxKind.GetKeyword OrElse CurrentToken.Kind = SyntaxKind.SetKeyword OrElse 3394CurrentToken.Kind = SyntaxKind.AddHandlerKeyword OrElse CurrentToken.Kind = SyntaxKind.RemoveHandlerKeyword OrElse CurrentToken.Kind = SyntaxKind.RaiseEventKeyword) 3396Dim methodKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 3397If Not IsFirstStatementOnLine(CurrentToken) Then 3415CurrentToken.Kind = SyntaxKind.OpenParenToken Then 3451Debug.Assert(CurrentToken.Kind = SyntaxKind.ImplementsKeyword, "Implements list parsing lost.") 3453Dim implementsKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 3502Debug.Assert(CurrentToken.Kind = SyntaxKind.HandlesKeyword, "Handles list parsing lost.") 3504Dim handlesKeyword = DirectCast(CurrentToken, KeywordSyntax) 3513If CurrentToken.Kind = SyntaxKind.MyBaseKeyword OrElse 3514CurrentToken.Kind = SyntaxKind.MyClassKeyword OrElse 3515CurrentToken.Kind = SyntaxKind.MeKeyword Then 3517eventContainer = SyntaxFactory.KeywordEventContainer(DirectCast(CurrentToken, KeywordSyntax)) 3520ElseIf CurrentToken.Kind = SyntaxKind.GlobalKeyword Then 3560If CurrentToken.Kind <> SyntaxKind.CommaToken Then 3602Dim subKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 3630If CurrentToken.Kind = SyntaxKind.NewKeyword Then 3631newKeyword = DirectCast(CurrentToken, KeywordSyntax) 3716If CurrentToken.Kind = SyntaxKind.HandlesKeyword Then 3723ElseIf CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 3734If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 3767Dim functionKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 3826If CurrentToken.Kind = SyntaxKind.NewKeyword Then 3855If CurrentToken.Kind = SyntaxKind.AsKeyword Then 3856asKeyword = DirectCast(CurrentToken, KeywordSyntax) 3859If CurrentToken.Kind = SyntaxKind.LessThanToken Then 3874If CurrentToken.Kind = SyntaxKind.HandlesKeyword Then 3882ElseIf CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 3917Dim operatorKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 3938If TryTokenAsContextualKeyword(CurrentToken, keyword) Then 3941operatorToken = CurrentToken 3977If CurrentToken.Kind <> SyntaxKind.OpenParenToken Then 3983If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 4011If CurrentToken.Kind = SyntaxKind.AsKeyword Then 4012asKeyword = DirectCast(CurrentToken, KeywordSyntax) 4015If CurrentToken.Kind = SyntaxKind.LessThanToken Then 4038If CurrentToken.Kind = SyntaxKind.HandlesKeyword Then 4039handlesOrImplementsKeyword = CurrentToken 4043ElseIf CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 4044handlesOrImplementsKeyword = CurrentToken 4096Debug.Assert(CurrentToken.Kind = SyntaxKind.PropertyKeyword, "ParsePropertyDefinition called on the wrong token.") 4098Dim propertyKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 4104If CurrentToken.Kind = SyntaxKind.GetKeyword OrElse 4105CurrentToken.Kind = SyntaxKind.SetKeyword OrElse 4106CurrentToken.Kind = SyntaxKind.LetKeyword Then 4114If CurrentToken.Kind = SyntaxKind.IdentifierToken Then 4136If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 4161If CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 4172If CurrentToken.Kind <> SyntaxKind.EndOfFileToken Then 4202Debug.Assert(CurrentToken.Kind = SyntaxKind.DelegateKeyword, "ParseDelegateStatement called on the wrong token.") 4204Dim delegateKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 4217Select Case (CurrentToken.Kind) 4221methodKeyword = DirectCast(CurrentToken, KeywordSyntax) 4227methodKeyword = DirectCast(CurrentToken, KeywordSyntax) 4275Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 4298If CurrentToken.Kind = SyntaxKind.InKeyword Then 4299optionalVarianceModifier = DirectCast(CurrentToken, KeywordSyntax) 4305If TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.OutKeyword, outKeyword) Then 4306Dim id = DirectCast(CurrentToken, IdentifierTokenSyntax) 4313If CurrentToken.Kind = SyntaxKind.CloseParenToken OrElse CurrentToken.Kind = SyntaxKind.CommaToken OrElse CurrentToken.Kind = SyntaxKind.AsKeyword Then 4331If CurrentToken.Kind = SyntaxKind.AsKeyword Then 4333asKeyword = DirectCast(CurrentToken, KeywordSyntax) 4415If CurrentToken.Kind = SyntaxKind.NewKeyword Then 4417keyword = DirectCast(CurrentToken, KeywordSyntax) 4423ElseIf CurrentToken.Kind = SyntaxKind.ClassKeyword Then 4425keyword = DirectCast(CurrentToken, KeywordSyntax) 4429ElseIf CurrentToken.Kind = SyntaxKind.StructureKeyword Then 4432keyword = DirectCast(CurrentToken, KeywordSyntax) 4439If Not CanTokenStartTypeName(CurrentToken) Then 4474Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Parameter list parsing confused.") 4479If CurrentToken.Kind <> SyntaxKind.CloseParenToken Then 4486If Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.LessThanToken Then 4503If CurrentToken.Kind <> SyntaxKind.CloseParenToken AndAlso Not MustEndStatement(CurrentToken) Then 4569Select Case (CurrentToken.Kind) 4572keyword = DirectCast(CurrentToken, KeywordSyntax) 4579keyword = DirectCast(CurrentToken, KeywordSyntax) 4589keyword = DirectCast(CurrentToken, KeywordSyntax) 4596keyword = DirectCast(CurrentToken, KeywordSyntax) 4697Debug.Assert(CurrentToken.Kind = SyntaxKind.ImportsKeyword, "called on wrong token") 4699Dim importsKeyword As KeywordSyntax = ReportModifiersOnStatementError(Attributes, Specifiers, DirectCast(CurrentToken, KeywordSyntax)) 4735If CurrentToken.Kind = SyntaxKind.LessThanToken Then 4744If CurrentToken.Kind = SyntaxKind.XmlNameToken AndAlso 4745CurrentToken.ToFullString = "xmlns" AndAlso 4778If (CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 4780CurrentToken.Kind = SyntaxKind.EqualsToken Then 4792Dim equalsToken As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 4815If importsClause.ContainsDiagnostics AndAlso CurrentToken.Kind <> SyntaxKind.CommaToken Then 4853Debug.Assert(CurrentToken.Kind = SyntaxKind.InheritsKeyword OrElse CurrentToken.Kind = SyntaxKind.ImplementsKeyword, 4856Dim keyword As KeywordSyntax = ReportModifiersOnStatementError(Attributes, Specifiers, DirectCast(CurrentToken, KeywordSyntax)) 4915Debug.Assert(CurrentToken.Kind = SyntaxKind.OptionKeyword, "must be at Option.") 4917Dim optionKeyword = ReportModifiersOnStatementError(Attributes, Specifiers, DirectCast(CurrentToken, KeywordSyntax)) 4920If TryTokenAsContextualKeyword(CurrentToken, optionType) Then 4928If TryTokenAsContextualKeyword(CurrentToken, optionValue) Then 4954If CurrentToken.Kind = SyntaxKind.OnKeyword Then 4955optionValue = DirectCast(CurrentToken, KeywordSyntax) 4958ElseIf TryTokenAsContextualKeyword(CurrentToken, optionValue) AndAlso 4962ElseIf Not IsValidStatementTerminator(CurrentToken) Then 5020Debug.Assert(CurrentToken.Kind = SyntaxKind.DeclareKeyword, "ParseProcDeclareStatement called on wrong token. Must be at a Declare.") 5027Dim declareKeyword = DirectCast(CurrentToken, KeywordSyntax) 5035If TryTokenAsContextualKeyword(CurrentToken, contextualKeyword) Then 5048If CurrentToken.Kind = SyntaxKind.SubKeyword Then 5049methodKeyword = DirectCast(CurrentToken, KeywordSyntax) 5053ElseIf CurrentToken.Kind = SyntaxKind.FunctionKeyword Then 5054methodKeyword = DirectCast(CurrentToken, KeywordSyntax) 5074If CurrentToken.Kind <> SyntaxKind.LibKeyword Then 5122CurrentToken.Kind = SyntaxKind.AsKeyword Then 5124Dim asKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 5129If Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.LessThanToken Then 5201If CurrentToken.Kind = SyntaxKind.AliasKeyword Then 5202optionalAliasKeyword = DirectCast(CurrentToken, KeywordSyntax) 5225Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.CustomKeyword, "ParseCustomEventDefinition called on the wrong token.") 5245optionalCustomKeyword = _scanner.MakeKeyword(DirectCast(CurrentToken, IdentifierTokenSyntax)) 5250Dim eventKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 5259If CurrentToken.Kind = SyntaxKind.AsKeyword Then 5260asKeyword = DirectCast(CurrentToken, KeywordSyntax) 5276If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 5287If CurrentToken.Kind = SyntaxKind.AsKeyword Then 5288asKeyword = DirectCast(CurrentToken, KeywordSyntax) 5302If CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 5332Debug.Assert(CurrentToken.Kind = SyntaxKind.EventKeyword, "ParseEventDefinition called on the wrong token.") 5334Dim eventKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 5349If CurrentToken.Kind = SyntaxKind.AsKeyword Then 5350asKeyword = DirectCast(CurrentToken, KeywordSyntax) 5367If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 5373If CurrentToken.Kind = SyntaxKind.AsKeyword Then 5389If CurrentToken.Kind = SyntaxKind.ImplementsKeyword Then 5402Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanGreaterThanToken) 5404Dim token = CurrentToken 5453Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken, "ParseAttributeSpecifier called on the wrong token.") 5468Dim assemblyOrModuleKeyword = GetTokenAsAssemblyOrModuleKeyword(CurrentToken) 5487If CurrentToken.Kind = SyntaxKind.ColonToken Then 5529ElseIf CurrentToken.Kind = SyntaxKind.OpenParenToken Then 5563Loop While CurrentToken.Kind = SyntaxKind.LessThanToken 5741If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso 5742Not CurrentToken.HasLeadingTrivia Then 5772Debug.Assert(CurrentToken.Kind = SyntaxKind.ColonToken) 5779Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind) OrElse CurrentToken.Kind = SyntaxKind.EmptyToken) 5781Select Case CurrentToken.Kind 5807Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind)) 5852If CurrentToken.Kind = kind Then 5853token = DirectCast(CurrentToken, T) 5866If TryTokenAsContextualKeyword(CurrentToken, kind, keyword) Then 5900If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso 5922If CurrentToken.Kind = kind Then 5923token = DirectCast(CurrentToken, T) 5925If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken Then 5946If CurrentToken.Kind = kind Then 5947token = DirectCast(CurrentToken, T) 5953token = DirectCast(CurrentToken, T) 6083If Me.CurrentToken.Kind = SyntaxKind.EndOfFileToken Then Return node 6085While (Me.CurrentToken.Kind <> SyntaxKind.EndOfFileToken) 6086b.Add(Me.CurrentToken)
Parser\ParseScan.vb (18)
132If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 206Dim nextToken = CurrentToken 246While CurrentToken.Kind <> SyntaxKind.EndOfFileToken 249If IsValidStatementTerminator(CurrentToken) OrElse CurrentToken.Kind = SyntaxKind.EmptyToken Then 252ElseIf CurrentToken.Kind = SyntaxKind.EndOfXmlToken OrElse CurrentToken.Kind = SyntaxKind.EndOfInterpolatedStringToken Then 256If IsTokenOrKeyword(CurrentToken, resyncTokens) Then 260skippedTokens.Add(CurrentToken) 282While CurrentToken.Kind <> SyntaxKind.EndOfFileToken AndAlso 283CurrentToken.Kind <> SyntaxKind.StatementTerminatorToken 285skippedTokens.Add(CurrentToken) 289If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken Then 290If CurrentToken.HasLeadingTrivia Then 291skippedTokens.Add(CurrentToken) 330If CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso 400If CurrentToken.IsEndOfLine Then 418Debug.Assert(If(offset = 0, CurrentToken, PeekToken(offset)).IsEndOfLine)
Parser\ParseStatement.vb (138)
25Debug.Assert(CurrentToken.Kind = SyntaxKind.ContinueKeyword, "ParseContinueStatement called on wrong token") 27Dim continueKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 33Select Case (CurrentToken.Kind) 37blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 42blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 47blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 96Debug.Assert(CurrentToken.Kind = SyntaxKind.ExitKeyword, "ParseExitStatement called on wrong token") 98Dim exitKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 105Select Case (CurrentToken.Kind) 109blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 114blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 119blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 124blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 135blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 141blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 147blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 152blockKeyword = DirectCast(CurrentToken, KeywordSyntax) 207Select Case CurrentToken.Kind 221CodeAnalysis.Syntax.InternalSyntax.SyntaxList.List(exitKeyword, CurrentToken), stmtError) 244Debug.Assert(CurrentToken.Kind = SyntaxKind.CaseKeyword, "ParseCaseStatement called on wrong token.") 246Dim caseKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 252If CurrentToken.Kind = SyntaxKind.ElseKeyword Then 253elseKeyword = DirectCast(CurrentToken, KeywordSyntax) 262Dim StartCase As SyntaxKind = CurrentToken.Kind ' dev10_500588 Snap the start of the expression token AFTER we've moved off the EOL (if one is present) 271If SyntaxFacts.IsRelationalOperator(CurrentToken.Kind) Then 273Dim relationalOperator = DirectCast(CurrentToken, PunctuationSyntax) 374Debug.Assert(CurrentToken.Kind = SyntaxKind.SelectKeyword, "ParseSelectStatement called on wrong token.") 376Dim selectKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 410Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword, "ParseIfConstruct called on wrong token.") 412Dim ifKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 432Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseKeyword, "ParseIfConstruct called on wrong token.") 434Dim elseKeyword = DirectCast(CurrentToken, KeywordSyntax) 444Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseIfKeyword OrElse (CurrentToken.Kind = SyntaxKind.ElseKeyword AndAlso PeekToken(1).Kind = SyntaxKind.IfKeyword), 449If CurrentToken.Kind = SyntaxKind.ElseIfKeyword Then 450elseIfKeyword = DirectCast(CurrentToken, KeywordSyntax) 454ElseIf CurrentToken.Kind = SyntaxKind.ElseKeyword Then 457Dim elseKeyword = DirectCast(CurrentToken, KeywordSyntax) 467Dim ifKeyword = DirectCast(CurrentToken, KeywordSyntax) 489Debug.Assert(CurrentToken.Kind = SyntaxKind.EndIfKeyword OrElse 490CurrentToken.Kind = SyntaxKind.GosubKeyword OrElse 491CurrentToken.Kind = SyntaxKind.WendKeyword, "ParseAnachronisticEndIfStatement called on wrong token") 493Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 528Debug.Assert(CurrentToken.Kind = SyntaxKind.DoKeyword, "ParseDoStatement called on wrong token") 530Dim doKeyword = DirectCast(CurrentToken, KeywordSyntax) 555Debug.Assert(CurrentToken.Kind = SyntaxKind.LoopKeyword, "ParseDoStatement called on wrong token") 557Dim loopKeyword = DirectCast(CurrentToken, KeywordSyntax) 581Debug.Assert(CurrentToken.Kind = SyntaxKind.ForKeyword, "ParseForStatement called on wrong token") 583Dim forKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 710Debug.Assert(CurrentToken.Kind = SyntaxKind.NextKeyword, "ParseNextStatement called on wrong token") 712Dim nextKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 716If CanFollowStatement(CurrentToken) Then 784Select Case (CurrentToken.Kind) 845If CurrentToken.Kind = SyntaxKind.AsKeyword Then 846[As] = DirectCast(CurrentToken, KeywordSyntax) 872Dim label As SyntaxToken = CurrentToken 920Debug.Assert(CurrentToken.Kind = SyntaxKind.GoToKeyword, "Alleged GOTO isn't.") 922Dim gotoKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 949Debug.Assert(CurrentToken.Kind = SyntaxKind.OnKeyword, "ON statement must start with ON.") 951Dim onKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 956If CurrentToken.Kind = SyntaxKind.ErrorKeyword Then 957errorKeyword = DirectCast(CurrentToken, KeywordSyntax) 965If CurrentToken.Kind = SyntaxKind.ResumeKeyword Then 969ElseIf CurrentToken.Kind = SyntaxKind.GoToKeyword Then 994Debug.Assert(CurrentToken.Kind = SyntaxKind.ResumeKeyword, "ParseOnErrorResumeNext called on wrong token.") 996Dim resumeKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1009Debug.Assert(CurrentToken.Kind = SyntaxKind.GoToKeyword, "ParseOnErrorGoto called on wrong token.") 1011Dim gotoKeyword = DirectCast(CurrentToken, KeywordSyntax) 1056Debug.Assert(CurrentToken.Kind = SyntaxKind.ResumeKeyword, "ParseResumeStatement called on wrong token.") 1058Dim resumeKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1064If Not IsValidStatementTerminator(CurrentToken) Then 1066If CurrentToken.Kind = SyntaxKind.NextKeyword Then 1068Dim nextKeyword = DirectCast(CurrentToken, KeywordSyntax) 1096If SyntaxFacts.IsAssignmentStatementOperatorToken(CurrentToken.Kind) Then 1098Dim operatorToken As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1127If Not CanEndExecutableStatement(CurrentToken) AndAlso 1128CurrentToken.Kind <> SyntaxKind.BadToken AndAlso 1204Debug.Assert(CurrentToken.Kind = SyntaxKind.CallKeyword, "ParseCallStatement called on wrong token.") 1206Dim callKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1243Debug.Assert(CurrentToken.Kind = SyntaxKind.RaiseEventKeyword, "RaiseEvent statement must start with RaiseEvent.") 1245Dim raiseEventKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1256If CurrentToken.Kind = SyntaxKind.OpenParenToken Then 1271Debug.Assert(CurrentToken.Kind = SyntaxKind.ReDimKeyword, "ParseRedimStatement must start with Redim.") 1272Dim reDimKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1278If CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 1279TryIdentifierAsContextualKeyword(CurrentToken, possibleKeyword) AndAlso possibleKeyword.Kind = SyntaxKind.PreserveKeyword Then 1329If CurrentToken.Kind = SyntaxKind.AsKeyword Then 1330statement = statement.AddTrailingSyntax(CurrentToken, ERRID.ERR_ObsoleteRedimAs) 1343Debug.Assert(CurrentToken.Kind = SyntaxKind.AddHandlerKeyword OrElse CurrentToken.Kind = SyntaxKind.RemoveHandlerKeyword, "Handler statement parsing confused.") 1345Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1381Debug.Assert(CurrentToken.Kind = SyntaxKind.WhileKeyword OrElse 1382CurrentToken.Kind = SyntaxKind.WithKeyword OrElse 1383CurrentToken.Kind = SyntaxKind.SyncLockKeyword, "ParseExpressionBlockStatement called on wrong token.") 1385Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1415Debug.Assert(CurrentToken.Kind = SyntaxKind.LetKeyword OrElse CurrentToken.Kind = SyntaxKind.SetKeyword, "Assignment statement parsing is lost.") 1418If CurrentToken.Kind = SyntaxKind.SetKeyword AndAlso 1426Dim keyword As SyntaxToken = CurrentToken 1439Debug.Assert(CurrentToken.Kind = SyntaxKind.TryKeyword, "ParseTry called on wrong token") 1441Dim tryKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1454Debug.Assert(CurrentToken.Kind = SyntaxKind.CatchKeyword, "ParseCatch called on wrong token.") 1456Dim catchKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1463If CurrentToken.Kind = SyntaxKind.IdentifierToken Then 1503Debug.Assert(CurrentToken.Kind = SyntaxKind.FinallyKeyword, "ParseFinally called on wrong token.") 1505Dim finallyKeyword = DirectCast(CurrentToken, KeywordSyntax) 1514Debug.Assert(CurrentToken.Kind = SyntaxKind.ThrowKeyword, "ParseThrowStatement called on wrong token.") 1516Dim throwKeyword = DirectCast(CurrentToken, KeywordSyntax) 1532Debug.Assert(CurrentToken.Kind = SyntaxKind.ErrorKeyword) 1534Dim errorKeyword = DirectCast(CurrentToken, KeywordSyntax) 1555Debug.Assert(CurrentToken.Kind = SyntaxKind.EraseKeyword, "Erase statement parsing lost.") 1557Dim eraseKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1570Return IsFirstStatementOnLine(CurrentToken) AndAlso PeekToken(1).Kind = SyntaxKind.ColonToken 1574Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.Kind = SyntaxKind.IntegerLiteralToken) 1578If labelName.Kind = SyntaxKind.IntegerLiteralToken AndAlso CurrentToken.Kind <> SyntaxKind.ColonToken Then 1611Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.MidKeyword) 1616Dim mid = DirectCast(CurrentToken, IdentifierTokenSyntax) 1619Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 1672If Not CanFollowStatement(CurrentToken) Then 1675If CurrentToken.Kind = SyntaxKind.WhileKeyword Then 1676keyword = DirectCast(CurrentToken, KeywordSyntax) 1678TryTokenAsContextualKeyword(CurrentToken, SyntaxKind.UntilKeyword, keyword) 1725Debug.Assert(CurrentToken.Kind = SyntaxKind.ReturnKeyword, "ParseReturnStatement called on wrong token.") 1727Dim returnKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1730Dim startToken = CurrentToken 1756If Not CanFollowStatement(CurrentToken) Then 1776Debug.Assert(CurrentToken.Kind = SyntaxKind.StopKeyword OrElse CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseStopOrEndStatement called on wrong token.") 1778Dim stopOrEndKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1789Debug.Assert(CurrentToken.Kind = SyntaxKind.UsingKeyword, "ParseUsingStatement called on wrong token") 1791Dim usingKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1821Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso 1822DirectCast(CurrentToken, IdentifierTokenSyntax).ContextualKind = SyntaxKind.AwaitKeyword, 1840Debug.Assert(DirectCast(CurrentToken, IdentifierTokenSyntax).ContextualKind = SyntaxKind.YieldKeyword) 1844TryIdentifierAsContextualKeyword(CurrentToken, yieldKeyword) 1859Dim questionToken = DirectCast(CurrentToken, PunctuationSyntax)
Parser\ParseTerminal.vb (23)
37If CurrentToken.Kind = SyntaxKind.IdentifierToken Then 39identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 53If CurrentToken.IsKeyword Then 54Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 65If (CurrentToken.Kind = SyntaxKind.BadToken AndAlso CurrentToken.Text = "_") Then 66identifier = identifier.AddLeadingSyntax(CurrentToken, ERRID.ERR_ExpectedIdentifier) 84If SyntaxKind.QuestionToken = CurrentToken.Kind AndAlso Not identifier.ContainsDiagnostics Then 85optionalNullable = DirectCast(CurrentToken, PunctuationSyntax) 112If CurrentToken.Kind = SyntaxKind.IdentifierToken Then 113identifier = DirectCast(CurrentToken, IdentifierTokenSyntax) 116ElseIf CurrentToken.IsKeyword() Then 117Dim keyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 162Debug.Assert(CurrentToken.Kind = SyntaxKind.IntegerLiteralToken, "Expected Integer literal.") 164Dim Literal As LiteralExpressionSyntax = SyntaxFactory.NumericLiteralExpression(CurrentToken) 171Debug.Assert(CurrentToken.Kind = SyntaxKind.CharacterLiteralToken, "Expected Char literal.") 173Dim Literal As LiteralExpressionSyntax = SyntaxFactory.CharacterLiteralExpression(CurrentToken) 181Debug.Assert(CurrentToken.Kind = SyntaxKind.DecimalLiteralToken, "must be at a decimal literal.") 183Dim Literal As LiteralExpressionSyntax = SyntaxFactory.NumericLiteralExpression(CurrentToken) 205CurrentToken.Kind = SyntaxKind.FloatingLiteralToken, 208Dim Literal As LiteralExpressionSyntax = SyntaxFactory.NumericLiteralExpression(CurrentToken) 217CurrentToken.Kind = SyntaxKind.DateLiteralToken, 220Dim Literal As LiteralExpressionSyntax = SyntaxFactory.DateLiteralExpression(CurrentToken)
Parser\ParseVerify.vb (1)
166Dim current As SyntaxToken = CurrentToken
Parser\ParseXml.vb (171)
22Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken OrElse 23CurrentToken.Kind = SyntaxKind.LessThanGreaterThanToken OrElse 24CurrentToken.Kind = SyntaxKind.LessThanSlashToken OrElse 25CurrentToken.Kind = SyntaxKind.BeginCDataToken OrElse 26CurrentToken.Kind = SyntaxKind.LessThanExclamationMinusMinusToken OrElse 27CurrentToken.Kind = SyntaxKind.LessThanQuestionToken, "ParseXmlMarkup called on the wrong token.") 34If CurrentToken.Kind = SyntaxKind.LessThanQuestionToken Then 49Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken, "ParseXmlDocument called on wrong token") 69Select Case CurrentToken.Kind 103Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken AndAlso 107Dim beginPrologue = DirectCast(CurrentToken, PunctuationSyntax) 127Select Case CurrentToken.Kind 129Dim optionName = DirectCast(CurrentToken, XmlNameTokenSyntax) 221If CurrentToken.Kind <> SyntaxKind.QuestionGreaterThanToken Then 257Debug.Assert(IsToken(CurrentToken, 270Dim hasPrecedingWhitespace = PrevToken.GetTrailingTrivia.ContainsWhitespaceTrivia() OrElse CurrentToken.GetLeadingTrivia.ContainsWhitespaceTrivia 278If CurrentToken.Kind = SyntaxKind.LessThanPercentEqualsToken Then 296Select Case CurrentToken.Kind 324Select Case (CurrentToken.Kind) 327Dim badToken = DirectCast(CurrentToken, BadTokenSyntax) 366Debug.Assert(CurrentToken.Kind = SyntaxKind.BadToken AndAlso 367DirectCast(CurrentToken, BadTokenSyntax).SubKind = SyntaxSubKind.BeginDocTypeToken, "ParseDTD called on wrong token.") 371Dim beginDocType = DirectCast(CurrentToken, BadTokenSyntax) 393If CurrentToken.Kind = SyntaxKind.XmlNameToken Then 395Dim name = DirectCast(CurrentToken, XmlNameTokenSyntax) 419If CurrentToken.Kind <> SyntaxKind.BadToken OrElse DirectCast(CurrentToken, BadTokenSyntax).SubKind <> SyntaxSubKind.OpenBracketToken Then 433If CurrentToken.Kind = SyntaxKind.BadToken AndAlso DirectCast(CurrentToken, BadTokenSyntax).SubKind = SyntaxSubKind.OpenBracketToken Then 437builder.Add(CurrentToken) 441If CurrentToken.Kind = SyntaxKind.BadToken AndAlso DirectCast(CurrentToken, BadTokenSyntax).SubKind = SyntaxSubKind.LessThanExclamationToken Then 442builder.Add(CurrentToken) 447If CurrentToken.Kind <> SyntaxKind.BadToken OrElse DirectCast(CurrentToken, BadTokenSyntax).SubKind <> SyntaxSubKind.CloseBracketToken Then 461builder.Add(CurrentToken) 471Select Case CurrentToken.Kind 473builder.Add(CurrentToken) 474Dim badToken = DirectCast(CurrentToken, BadTokenSyntax) 489builder.Add(CurrentToken) 498builder.Add(CurrentToken) 509Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken, "ParseXmlElement call on wrong token.") 511Dim lessThan As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 523Select Case (CurrentToken.Kind) 527greaterThan = DirectCast(CurrentToken, PunctuationSyntax) 534endEmptyElementToken = DirectCast(CurrentToken, PunctuationSyntax) 543Dim divideToken As SyntaxToken = CurrentToken 547greaterThan = DirectCast(CurrentToken, PunctuationSyntax) 576Debug.Assert(IsToken(CurrentToken, 596Select Case CurrentToken.Kind 660textTokens.Add(DirectCast(CurrentToken, XmlTextTokenSyntax)) 663newKind = CurrentToken.Kind 673Dim badToken = DirectCast(CurrentToken, BadTokenSyntax) 790Select Case CurrentToken.Kind 792Dim endEmptyElementToken = DirectCast(CurrentToken, PunctuationSyntax) 801greaterThan = DirectCast(CurrentToken, PunctuationSyntax) 840Dim currentKind = CurrentToken.Kind 845result = SyntaxFactory.XmlText(CurrentToken) 869If CurrentToken.Kind <> SyntaxKind.LessThanSlashToken Then 879If CurrentToken.Kind = SyntaxKind.LessThanToken Then 880Dim lessThan = DirectCast(CurrentToken, PunctuationSyntax) 910If CurrentToken.Kind = SyntaxKind.XmlNameToken Then 930Select Case CurrentToken.Kind 958Debug.Assert(IsToken(CurrentToken, 968If CurrentToken.Kind = SyntaxKind.XmlNameToken OrElse 969(AllowNameAsExpression AndAlso CurrentToken.Kind = SyntaxKind.LessThanPercentEqualsToken) OrElse 970CurrentToken.Kind = SyntaxKind.EqualsToken OrElse 971CurrentToken.Kind = SyntaxKind.SingleQuoteToken OrElse 972CurrentToken.Kind = SyntaxKind.DoubleQuoteToken Then 977If CurrentToken.Kind = SyntaxKind.EqualsToken Then 979Dim equals = DirectCast(CurrentToken, PunctuationSyntax) 984If CurrentToken.Kind = SyntaxKind.LessThanPercentEqualsToken Then 1006If CurrentToken.Kind <> SyntaxKind.SingleQuoteToken AndAlso 1007CurrentToken.Kind <> SyntaxKind.DoubleQuoteToken Then 1063If CurrentToken.Kind = SyntaxKind.SingleQuoteToken Then 1064state = If(CurrentToken.Text = "'"c, ScannerState.SingleQuotedString, ScannerState.SmartSingleQuotedString) 1065startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1066ElseIf CurrentToken.Kind = SyntaxKind.DoubleQuoteToken Then 1067state = If(CurrentToken.Text = """"c, ScannerState.QuotedString, ScannerState.SmartQuotedString) 1068startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1099If SyntaxFacts.IsPredefinedTypeKeyword(Me.CurrentToken.Kind) Then 1100Dim type As PredefinedTypeSyntax = SyntaxFactory.PredefinedType(DirectCast(CurrentToken, KeywordSyntax)) 1121Select Case Me.CurrentToken.Kind 1125Dim endQuote = DirectCast(CurrentToken, PunctuationSyntax) 1133Dim token As SyntaxToken = CurrentToken 1169If CurrentToken.Kind = SyntaxKind.OpenParenToken AndAlso name.Kind <> SyntaxKind.PredefinedType Then 1175If CurrentToken.Kind = SyntaxKind.AsKeyword Then 1176Dim asKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1199Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken) 1200Dim openParen As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1207Dim currToken As SyntaxToken = Me.CurrentToken 1232Debug.Assert(CurrentToken.Kind = SyntaxKind.CommaToken) 1233signatureTypes.AddSeparator(CurrentToken) 1238While CurrentToken.Kind = SyntaxKind.ByValKeyword OrElse CurrentToken.Kind = SyntaxKind.ByRefKeyword 1241modifier = DirectCast(CurrentToken, KeywordSyntax) 1244modifier = modifier.AddTrailingSyntax(CurrentToken, ERRID.ERR_InvalidParameterSyntax) 1260Dim operatorKeyword As KeywordSyntax = DirectCast(CurrentToken, KeywordSyntax) 1267If TryTokenAsContextualKeyword(CurrentToken, keyword) Then 1270operatorToken = CurrentToken 1288If CurrentToken.Kind = SyntaxKind.GlobalKeyword Then 1289result = SyntaxFactory.GlobalName(DirectCast(CurrentToken, KeywordSyntax)) 1292ElseIf CurrentToken.Kind = SyntaxKind.ObjectKeyword Then 1299DirectCast(Me.CurrentToken, KeywordSyntax))) 1302ElseIf CurrentToken.Kind = SyntaxKind.OperatorKeyword Then 1306ElseIf CurrentToken.Kind = SyntaxKind.NewKeyword Then 1318Debug.Assert(Not SyntaxFacts.IsPredefinedTypeKeyword(CurrentToken.Kind)) 1333While CurrentToken.Kind = SyntaxKind.DotToken 1334Dim dotToken As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1337If CurrentToken.Kind = SyntaxKind.OperatorKeyword Then 1386If CurrentToken.Kind = SyntaxKind.SingleQuoteToken Then 1387state = If(CurrentToken.Text = "'"c, ScannerState.SingleQuotedString, ScannerState.SmartSingleQuotedString) 1388startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1389ElseIf CurrentToken.Kind = SyntaxKind.DoubleQuoteToken Then 1390state = If(CurrentToken.Text = """"c, ScannerState.QuotedString, ScannerState.SmartQuotedString) 1391startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1403Dim identToken As SyntaxToken = CurrentToken 1406identToken = Me._scanner.MakeIdentifier(DirectCast(Me.CurrentToken, KeywordSyntax)) 1423Dim closingToken As SyntaxToken = Me.CurrentToken 1425Dim endQuote = DirectCast(CurrentToken, PunctuationSyntax) 1522Select Case (CurrentToken.Kind) 1542(PrevToken.GetTrailingTrivia.ContainsWhitespaceTrivia() OrElse CurrentToken.GetLeadingTrivia.ContainsWhitespaceTrivia) 1544Dim localName = DirectCast(CurrentToken, XmlNameTokenSyntax) 1553If CurrentToken.Kind = SyntaxKind.ColonToken Then 1555Dim colon As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1559If CurrentToken.Kind = SyntaxKind.XmlNameToken Then 1561localName = DirectCast(CurrentToken, XmlNameTokenSyntax) 1594If Not IsValidXmlQualifiedNameToken(CurrentToken) Then 1598Dim localName = ToXmlNameToken(CurrentToken) 1615Debug.Assert(CurrentToken.FullWidth = 0) 1623Dim colon = DirectCast(CurrentToken, PunctuationSyntax) 1631IsValidXmlQualifiedNameToken(CurrentToken) Then 1633localName = ToXmlNameToken(CurrentToken) 1704If CurrentToken.Kind = SyntaxKind.EndOfXmlToken Then 1707If CurrentToken.Kind = SyntaxKind.DocumentationCommentLineBreakToken Then 1727Debug.Assert(IsToken(CurrentToken, 1748Select Case (CurrentToken.Kind) 1775textTokens.Add(DirectCast(CurrentToken, XmlTextTokenSyntax)) 1778newKind = CurrentToken.Kind 1792Dim badToken = DirectCast(CurrentToken, BadTokenSyntax) 1827Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken, "ParseXmlPI called on the wrong token.") 1829Dim beginProcessingInstruction = DirectCast(CurrentToken, PunctuationSyntax) 1854If CurrentToken.Kind = SyntaxKind.XmlTextLiteralToken OrElse CurrentToken.Kind = SyntaxKind.DocumentationCommentLineBreakToken Then 1855textToken = DirectCast(CurrentToken, XmlTextTokenSyntax) 1866If CurrentToken.Kind <> SyntaxKind.XmlTextLiteralToken AndAlso CurrentToken.Kind <> SyntaxKind.DocumentationCommentLineBreakToken Then 1869textToken = DirectCast(CurrentToken, XmlTextTokenSyntax) 1889Debug.Assert(CurrentToken.Kind = SyntaxKind.BeginCDataToken, "ParseXmlCData called on the wrong token.") 1891Dim beginCData = DirectCast(CurrentToken, PunctuationSyntax) 1897Do While CurrentToken.Kind = SyntaxKind.XmlTextLiteralToken OrElse CurrentToken.Kind = SyntaxKind.DocumentationCommentLineBreakToken 1898values.Add(DirectCast(CurrentToken, XmlTextTokenSyntax)) 1915Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanExclamationMinusMinusToken, "ParseXmlComment called on wrong token.") 1917Dim beginComment As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 1922Do While CurrentToken.Kind = SyntaxKind.XmlTextLiteralToken OrElse CurrentToken.Kind = SyntaxKind.DocumentationCommentLineBreakToken 1923Dim textToken = DirectCast(CurrentToken, XmlTextTokenSyntax) 1948If CurrentToken.Kind = SyntaxKind.SingleQuoteToken Then 1949state = If(CurrentToken.Text = "'"c, ScannerState.SingleQuotedString, ScannerState.SmartSingleQuotedString) 1950startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1952ElseIf CurrentToken.Kind = SyntaxKind.DoubleQuoteToken Then 1953state = If(CurrentToken.Text = """"c, ScannerState.QuotedString, ScannerState.SmartQuotedString) 1954startQuote = DirectCast(CurrentToken, PunctuationSyntax) 1967Dim kind = CurrentToken.Kind 1973Dim endQuote = DirectCast(CurrentToken, PunctuationSyntax) 1986list.Add(DirectCast(CurrentToken, XmlTextTokenSyntax)) 2006Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanPercentEqualsToken, "ParseXmlEmbedded called on wrong token") 2008Dim beginXmlEmbedded As PunctuationSyntax = DirectCast(CurrentToken, PunctuationSyntax) 2028If CurrentToken.Kind = SyntaxKind.PercentGreaterThanToken Then 2029endXmlEmbedded = DirectCast(CurrentToken, PunctuationSyntax)
Scanner\XmlDocComments.vb (1)
102If nodes.Count = 0 AndAlso parser.CurrentToken.Kind = SyntaxKind.EndOfXmlToken Then