1 write to Parser
Microsoft.CodeAnalysis.VisualBasic (1)
Parser\BlockContexts\CompilationUnitContext.vb (1)
28
Me.
Parser
= parser
84 references to Parser
Microsoft.CodeAnalysis.VisualBasic (84)
Parser\BlockContexts\BlockContext.vb (11)
90
_parser = prev.
Parser
111
beginStmt =
Parser
.ReportSyntaxError(beginStmt, errorId)
299
Dim unexpected =
Parser
.ResyncAt()
375
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_BogusWithinLineIf)
403
Parser
.GetNextSyntaxNode()
439
If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(
Parser
.CurrentToken.Kind) Then
452
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_ElseNoMatchingIf))
461
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_ElseIfNoMatchingIf))
478
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_CaseNoSelect))
484
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_CaseElseNoSelect))
510
Add(
Parser
.ReportSyntaxError(node, If(node.Kind = SyntaxKind.CatchStatement, ERRID.ERR_CatchNoMatchingTry, ERRID.ERR_FinallyNoMatchingTry)))
Parser\BlockContexts\CaseBlockContext.vb (1)
30
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_CaseAfterCaseElse)
Parser\BlockContexts\CompilationUnitContext.vb (3)
35
Return
Parser
.IsScript
122
Dim regionsAreAllowedEverywhere = Not haveRegionDirectives OrElse
Parser
.CheckFeatureAvailability(Feature.RegionsEverywhere)
126
result = DiagnosticRewriter.Rewrite(result, notClosedIfDirectives, notClosedRegionDirectives, regionsAreAllowedEverywhere, notClosedExternalSourceDirective,
Parser
)
Parser\BlockContexts\DeclarationContext.vb (21)
21
Return
Parser
.ParseDeclarationStatement()
50
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_NamespaceNotAtNamespace)
61
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ModuleNotAtNamespace)
87
If Not
Parser
.IsFirstStatementOnLine(node.GetFirstToken) Then
88
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_MethodMustBeFirstStatementOnLine)
99
If Not
Parser
.IsFirstStatementOnLine(node.GetFirstToken) Then
100
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_MethodMustBeFirstStatementOnLine)
106
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_OperatorDeclaredInModule)
147
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ExpectedDeclaration)
160
node =
Parser
.ReportSyntaxError(eventDecl, ERRID.ERR_CustomEventRequiresAs)
168
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_AttributeStmtWrongOrder)
172
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_OptionStmtWrongOrder)
176
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ImportsMustBeFirst)
183
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_BadInterfaceOrderOnInherits)
185
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InheritsStmtWrongOrder)
191
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ImplementsStmtWrongOrder)
225
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InvOutsideProc)
239
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ExecutableAsDeclaration)
348
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ExecutableAsDeclaration)
461
statement =
Parser
.ReportSyntaxError(statement, ErrorId)
472
Parser
.ConsumeStatementTerminator(colonAsSeparator:=False)
Parser\BlockContexts\DoLoopBlockContext.vb (1)
39
Dim keyword =
Parser
.ReportSyntaxError(whileUntilClause.WhileOrUntilKeyword, ERRID.ERR_LoopDoubleCondition)
Parser\BlockContexts\EnumDeclarationBlockContext.vb (2)
42
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEnum))
46
Return outerContext.ProcessSyntax(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEndsEnum))
Parser\BlockContexts\EventBlockContext.vb (1)
48
Return context.ProcessSyntax(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEndsEvent))
Parser\BlockContexts\ExecutableStatementContext.vb (6)
22
Return
Parser
.ParseStatementInMethodBody()
48
Return context.ProcessSyntax(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEndsProc))
72
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideProc)
208
Dim kind =
Parser
.CurrentToken.Kind
229
Parser
.IsNextStatementInsideLambda(Me, lambdaContext, allowLeadingMultiline) Then
232
Parser
.ConsumeStatementTerminator(colonAsSeparator:=singleLine)
Parser\BlockContexts\FinallyPartBlock.vb (2)
30
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_CatchAfterFinally))
36
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_FinallyAfterFinally))
Parser\BlockContexts\IfBlockContext.vb (1)
78
begin =
Parser
.ReportSyntaxError(begin, ERRID.ERR_ExpectedEndIf)
Parser\BlockContexts\IfPartContext.vb (2)
78
If Not SyntaxFacts.IsTerminator(
Parser
.CurrentToken.Kind) Then
82
Parser
.ConsumedStatementTerminator(allowLeadingMultilineTrivia:=False)
Parser\BlockContexts\InterfaceDeclarationBlockContext.vb (8)
70
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InterfaceMemberSyntax)
80
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_NewInInterface))
86
eventStatement =
Parser
.ReportSyntaxError(eventStatement, ERRID.ERR_CustomEventInvInInterface)
103
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_InterfaceMemberSyntax))
106
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InvOutsideProc)
127
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideInterface))
139
Return outerContext.ProcessSyntax(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEndsInterface))
142
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideInterface))
Parser\BlockContexts\MethodBlockContext.vb (2)
34
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_MethodBodyNotAtLineStart)
47
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ExitPropNot)
Parser\BlockContexts\PropertyBlockContext.vb (2)
75
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_InvInsideEndsProperty)
131
Parser
.ReportSyntaxError(beginBlockStmt.ParameterList, ERRID.ERR_AutoPropertyCantHaveParams),
Parser\BlockContexts\SelectBlockContext.vb (1)
49
node =
Parser
.ReportSyntaxError(node, ERRID.ERR_ExpectedCase)
Parser\BlockContexts\SingleLineElseContext.vb (7)
32
If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(
Parser
.CurrentToken.Kind) Then
46
Add(
Parser
.ReportSyntaxError(node, If(node.Kind = SyntaxKind.CatchStatement, ERRID.ERR_CatchNoMatchingTry, ERRID.ERR_FinallyNoMatchingTry)))
81
Dim token =
Parser
.CurrentToken
93
Parser
.ConsumeColonInSingleLineExpression()
104
Dim token =
Parser
.CurrentToken
112
Parser
.ConsumedStatementTerminator(allowLeadingMultilineTrivia:=False)
128
Parser
.ConsumedStatementTerminator(allowLeadingMultilineTrivia:=False)
Parser\BlockContexts\SingleLineIfBlockContext.vb (8)
32
If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(
Parser
.CurrentToken.Kind) Then
38
Add(
Parser
.ReportSyntaxError(node, ERRID.ERR_ExpectedEOS))
55
Add(
Parser
.ReportSyntaxError(node, If(node.Kind = SyntaxKind.CatchStatement, ERRID.ERR_CatchNoMatchingTry, ERRID.ERR_FinallyNoMatchingTry)))
87
Dim token =
Parser
.CurrentToken
97
Parser
.ConsumeColonInSingleLineExpression()
106
Dim token =
Parser
.CurrentToken
112
Parser
.ConsumedStatementTerminator(allowLeadingMultilineTrivia:=False)
125
Parser
.ConsumedStatementTerminator(allowLeadingMultilineTrivia:=False)
Parser\BlockContexts\SingleLineLambdaContext.vb (4)
48
lambdaExpr =
Parser
.ReportSyntaxError(lambdaExpr, ERRID.ERR_SubRequiresSingleStatement)
50
lambdaExpr =
Parser
.ReportSyntaxError(lambdaExpr, ERRID.ERR_BadIteratorExpressionLambda)
71
Dim token =
Parser
.CurrentToken
81
_statements(0) =
Parser
.ReportSyntaxError(_statements(0), ERRID.ERR_SubRequiresSingleStatement)
Parser\BlockContexts\TryBlockContext.vb (1)
76
beginStmt =
Parser
.ReportSyntaxError(beginStmt, ERRID.ERR_ExpectedEndTry)