1 type derived from BlockContext
Microsoft.CodeAnalysis.VisualBasic (1)
Parser\BlockContexts\DeclarationContext.vb (1)
14
Inherits
BlockContext
1 instantiation of BlockContext
Microsoft.CodeAnalysis.VisualBasic (1)
Parser\BlockContexts\DeclarationContext.vb (1)
17
MyBase.
New
(kind, statement, context)
143 references to BlockContext
Microsoft.CodeAnalysis.VisualBasic (143)
Parser\BlockContexts\BlockContext.vb (16)
25
Private ReadOnly _prev As
BlockContext
33
Protected Sub New(kind As SyntaxKind, statement As StatementSyntax, prev As
BlockContext
)
181
Friend ReadOnly Property PrevBlock As
BlockContext
290
Friend MustOverride Function ProcessSyntax(syntax As VisualBasicSyntaxNode) As
BlockContext
294
Friend MustOverride Function EndBlock(statement As StatementSyntax) As
BlockContext
296
Friend MustOverride Function RecoverFromMismatchedEnd(statement As StatementSyntax) As
BlockContext
298
Friend Overridable Function ResyncAndProcessStatementTerminator(statement As StatementSyntax, lambdaContext As
BlockContext
) As
BlockContext
304
Friend MustOverride Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
356
Friend MustOverride Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
358
Friend Function LinkSyntax(node As VisualBasicSyntaxNode) As
BlockContext
401
Friend Function UseSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
, Optional AddMissingTerminator As Boolean = False) As LinkResult
417
Friend Function TryUseStatement(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
428
Friend Function TryProcessExecutableStatement(node As VisualBasicSyntaxNode) As
BlockContext
540
Friend Function TryLinkStatement(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\BlockContextExtensions.vb (17)
12
Friend Function EndLambda(context As
BlockContext
) As
BlockContext
22
Friend Sub RecoverFromMissingEnd(context As
BlockContext
, lastContext As
BlockContext
)
31
Friend Function IsWithin(context As
BlockContext
, ParamArray kinds() As SyntaxKind) As Boolean
36
Friend Function FindNearest(context As
BlockContext
, conditionIsTrue As Func(Of
BlockContext
, Boolean)) As
BlockContext
47
Friend Function FindNearest(context As
BlockContext
, conditionIsTrue As Func(Of SyntaxKind, Boolean)) As
BlockContext
58
Friend Function FindNearest(context As
BlockContext
, ParamArray kinds() As SyntaxKind) As
BlockContext
69
Friend Function FindNearestInSameMethodScope(context As
BlockContext
, ParamArray kinds() As SyntaxKind) As
BlockContext
83
Friend Function FindNearestLambdaOrSingleLineIf(context As
BlockContext
, lastContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\CaseBlockContext.vb (4)
17
Friend Sub New(contextKind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
24
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
40
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
71
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
Parser\BlockContexts\CatchPartContext.vb (4)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
23
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
36
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
62
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
Parser\BlockContexts\CompilationUnitContext.vb (2)
39
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
80
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\DeclarationContext.vb (7)
16
Friend Sub New(kind As SyntaxKind, statement As StatementSyntax, context As
BlockContext
)
24
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
249
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
359
Friend Overrides Function RecoverFromMismatchedEnd(statement As StatementSyntax) As
BlockContext
465
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
471
Friend Overrides Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\DoLoopBlockContext.vb (1)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
Parser\BlockContexts\EnumDeclarationBlockContext.vb (3)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
34
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
53
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\EventBlockContext.vb (3)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
22
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
54
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\ExecutableStatementContext.vb (5)
17
Friend Sub New(contextKind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
25
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
89
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
207
Friend Overrides Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\FinallyPartBlock.vb (4)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
23
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
43
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
68
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
Parser\BlockContexts\ForBlockContext.vb (3)
24
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
56
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
58
Dim context As
BlockContext
= Me
Parser\BlockContexts\IfBlockContext.vb (4)
19
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
28
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
52
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
90
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
Parser\BlockContexts\IfPartContext.vb (6)
17
Friend Sub New(kind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
23
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
37
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
68
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
76
Friend Overrides Function ResyncAndProcessStatementTerminator(statement As StatementSyntax, lambdaContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\InterfaceDeclarationBlockContext.vb (4)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
23
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
149
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
194
Friend Overrides Function RecoverFromMismatchedEnd(statement As StatementSyntax) As
BlockContext
Parser\BlockContexts\LambdaContext.vb (2)
15
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
44
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
Parser\BlockContexts\MethodBlockContext.vb (3)
17
Friend Sub New(contextKind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
28
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
94
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\NamespaceBlockContext.vb (4)
17
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
21
Friend Sub New(kind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
27
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
50
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\PropertyBlockContext.vb (5)
19
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
, isPropertyBlock As Boolean)
50
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
70
Dim context As
BlockContext
= EndBlock(Nothing)
85
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
109
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
Parser\BlockContexts\SelectBlockContext.vb (3)
21
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
29
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
60
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
Parser\BlockContexts\SingleLineElseContext.vb (8)
15
Friend Sub New(kind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
22
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
71
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
80
Friend Overrides Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
103
Friend Overrides Function ResyncAndProcessStatementTerminator(statement As StatementSyntax, lambdaContext As
BlockContext
) As
BlockContext
163
Private Function ProcessElseAsStatementTerminator() As
BlockContext
Parser\BlockContexts\SingleLineIfBlockContext.vb (7)
18
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
25
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
80
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
86
Friend Overrides Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
105
Friend Overrides Function ResyncAndProcessStatementTerminator(statement As StatementSyntax, lambdaContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\SingleLineIfOrElseBlockContext.vb (3)
10
Protected Sub New(kind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
25
Dim parentContext As
BlockContext
= PrevBlock
43
Protected Function ProcessOtherAsStatementTerminator() As
BlockContext
Parser\BlockContexts\SingleLineLambdaContext.vb (6)
16
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
58
Friend Overrides Function EndBlock(endStmt As StatementSyntax) As
BlockContext
66
Friend Overrides Function ResyncAndProcessStatementTerminator(statement As StatementSyntax, lambdaContext As
BlockContext
) As
BlockContext
70
Friend Overrides Function ProcessStatementTerminator(lambdaContext As
BlockContext
) As
BlockContext
Parser\BlockContexts\StatementBlockContext.vb (1)
16
Friend Sub New(kind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
Parser\BlockContexts\TryBlockContext.vb (4)
19
Friend Sub New(statement As StatementSyntax, prevContext As
BlockContext
)
28
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
50
Friend Overrides Function TryLinkSyntax(node As VisualBasicSyntaxNode, ByRef newContext As
BlockContext
) As LinkResult
88
Friend Overrides Function EndBlock(statement As StatementSyntax) As
BlockContext
Parser\BlockContexts\TypeBlockContext.vb (2)
18
Friend Sub New(contextKind As SyntaxKind, statement As StatementSyntax, prevContext As
BlockContext
)
30
Friend Overrides Function ProcessSyntax(node As VisualBasicSyntaxNode) As
BlockContext
Parser\Parser.vb (11)
47
Private _context As
BlockContext
= Nothing
378
Private Function GetCurrentSyntaxNodeIfApplicable(<Out()> ByRef curSyntaxNode As VisualBasicSyntaxNode) As
BlockContext
379
Dim result As
BlockContext
.LinkResult
388
result =
BlockContext
.LinkResult.NotUsed
393
result =
BlockContext
.LinkResult.NotUsed
400
If result <>
BlockContext
.LinkResult.Crumble OrElse
407
If (result And
BlockContext
.LinkResult.Used) =
BlockContext
.LinkResult.Used Then
5687
Friend ReadOnly Property Context As
BlockContext
5805
Friend Function IsNextStatementInsideLambda(context As
BlockContext
, lambdaContext As
BlockContext
, allowLeadingMultilineTrivia As Boolean) As Boolean
Parser\ParseStatement.vb (1)
724
Dim enclosing As
BlockContext
= Context