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