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