1075 references to SyntaxFacts
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (3)
VisualBasicParsingTests.cs (3)
30var kind = SyntaxFacts.GetKeywordKind(text); 37var expectedKeywordKinds = ImmutableHashSet.CreateRange(SyntaxFacts.GetReservedKeywordKinds()); 48var expectedKind = SyntaxFacts.GetKeywordKind(pair.Key).ToString();
Microsoft.CodeAnalysis.VisualBasic (414)
Binding\AttributeSemanticModel.vb (1)
64If SyntaxFacts.IsAttributeName(node) Then
Binding\Binder_Delegates.vb (2)
313SyntaxFacts.GetText(SyntaxKind.AddressOfKeyword)) 953Return SyntaxFacts.GetText(keyword)
Binding\Binder_Expressions.vb (7)
12Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 602(((TypeOf node Is NameSyntax) OrElse node.Kind = SyntaxKind.ArrayType OrElse node.Kind = SyntaxKind.TupleType) AndAlso SyntaxFacts.IsInNamespaceOrTypeContext(node)) Then 632Return Me.BindExpression(node, isInvocationOrAddressOf:=SyntaxFacts.IsInvocationOrAddressOfOperand(node), diagnostics:=diagnostics, isOperandOfConditionalBranch:=False, eventContext:=False) 2315ReportDiagnostic(diagnostics, node, err, SyntaxFacts.GetText(node.Keyword.Kind)) 2338ReportDiagnostic(diagnostics, node, err, SyntaxFacts.GetText(node.Keyword.Kind)) 2350ReportDiagnostic(diagnostics, node, err, SyntaxFacts.GetText(node.Keyword.Kind)) 2780CaseInsensitiveComparison.Equals(identifier.ValueText, SyntaxFacts.GetText(SyntaxKind.NewKeyword)) Then
Binding\Binder_Lookup.vb (1)
449Dim aliasAsKeyword As SyntaxKind = SyntaxFacts.GetKeywordKind(possibleAlias)
Binding\Binder_Operators.vb (5)
662SyntaxFacts.GetText(If(opKind = BinaryOperatorKind.AndAlso, 692SyntaxFacts.GetText(If(opKind = BinaryOperatorKind.AndAlso, SyntaxKind.IsFalseKeyword, SyntaxKind.IsTrueKeyword)), 693SyntaxFacts.GetText(If(opKind = BinaryOperatorKind.AndAlso, SyntaxKind.AndAlsoKeyword, SyntaxKind.OrElseKeyword))) 707SyntaxFacts.GetText(If(opKind = BinaryOperatorKind.AndAlso, SyntaxKind.AndAlsoKeyword, SyntaxKind.OrElseKeyword)), 947Dim operatorTokenText = SyntaxFacts.GetText(operatorTokenKind)
Binding\Binder_SelectCase.vb (1)
208Debug.Assert(SyntaxFacts.IsRelationalOperator(node.OperatorToken.Kind) OrElse node.ContainsDiagnostics)
Binding\Binder_Statements.vb (4)
224If Not SyntaxFacts.IsDoLoopBlock(node.Parent.Kind) Then 3262ReportDiagnostic(diagnostics, syntax, ERRID.ERR_ForLoopOperatorRequired2, left.Type, SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(opCode))) 4982ReportDiagnostic(diagnostics, originalSyntax, ERRID.ERR_KeywordNotAllowedInScript, SyntaxFacts.GetText(SyntaxKind.ReturnKeyword)) 5109ReportDiagnostic(diagnostics, originalSyntax, ERRID.ERR_KeywordNotAllowedInScript, SyntaxFacts.GetText(SyntaxKind.YieldKeyword))
Binding\Binder_Symbols.vb (2)
854If SyntaxFacts.IsAttributeName(basicNameSyntax) Then 969If SyntaxFacts.IsAttributeName(rightIdentSyntax) Then
Binding\BinderFactory.BinderFactoryVisitor.vb (3)
101If SyntaxFacts.InBlockInterior(nsBlockSyntax, _position) Then 211If SyntaxFacts.InBlockInterior(methodBlockSyntax, _position) Then 257Return (nodeOpt IsNot Nothing) AndAlso SyntaxFacts.InSpanOrEffectiveTrailingOfNode(nodeOpt, position)
Binding\BinderFactory.vb (1)
50If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(node, position) OrElse
Binding\DocumentationCommentCrefBinder.vb (3)
51If Not identifier.IsBracketed AndAlso IsIntrinsicTypeForDocumentationComment(SyntaxFacts.GetKeywordKind(identifier.ValueText)) Then 553If IdentifierComparison.Equals(identifier.Identifier.ValueText, SyntaxFacts.GetText(SyntaxKind.NewKeyword)) AndAlso Not token.IsBracketed Then 631If IdentifierComparison.Equals(identifier.Identifier.ValueText, SyntaxFacts.GetText(SyntaxKind.NewKeyword)) AndAlso Not token.IsBracketed Then
Binding\MemberSemanticModel.vb (13)
1276ElseIf SyntaxFacts.InBlockInterior(current, position, body) Then 1283ElseIf SyntaxFacts.InLambdaInterior(current, position) Then 1424If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(aggregate, position) Then 1466If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(join, position) Then 1495If Not join.OnKeyword.IsMissing AndAlso join.OnKeyword.SpanStart <= position AndAlso SyntaxFacts.InSpanOrEffectiveTrailingOfNode(join, position) Then 1514If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(from, position) Then 1527If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(item, position) OrElse position < item.SpanStart Then 1558If SyntaxFacts.InSpanOrEffectiveTrailingOfNode([let], position) Then 1561If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(item, position) OrElse position < item.SpanStart Then 1584If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(groupBy, position) Then 1621((func.CloseParenToken.IsMissing AndAlso SyntaxFacts.InSpanOrEffectiveTrailingOfNode(func, position)) OrElse position < func.CloseParenToken.SpanStart) Then 1641If operatorKeyWord.SpanStart <= position AndAlso SyntaxFacts.InSpanOrEffectiveTrailingOfNode(operatorSyntax, position) Then 1711If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(initialization, position) Then
CommandLine\VisualBasicCommandLineParser.vb (2)
15Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 2106remainderErrorLine.Append(SyntaxFacts.GetText(SyntaxKind.ColonToken))
Compilation\SemanticModel.vb (5)
129(TypeOf (node) Is ExpressionSyntax AndAlso (allowNamedArgumentName OrElse Not SyntaxFacts.IsNamedArgumentName(node)) OrElse 162If SyntaxFacts.IsNamedArgumentName(expression) Then 291If SyntaxFacts.IsNamedArgumentName(expression) Then 2750Debug.Assert(SyntaxFacts.IsNamedArgumentName(identifierNameSyntax)) 2925If SyntaxFacts.IsWithinPreprocessorConditionalExpression(node) Then
Compilation\SpeculativeSyntaxTreeSemanticModel.vb (1)
84If SyntaxFacts.IsInNamespaceOrTypeContext(node) Then
Compilation\SyntaxTreeSemanticModel.vb (13)
217If result.IsEmpty AndAlso SyntaxFacts.IsInNamespaceOrTypeContext(node) Then 233If SyntaxFacts.IsImplementedMember(node) Then 235ElseIf SyntaxFacts.IsHandlesEvent(node) Then 237ElseIf SyntaxFacts.IsHandlesContainer(node) Then 244ElseIf SyntaxFacts.IsHandlesProperty(node) Then 248ElseIf SyntaxFacts.IsInNamespaceOrTypeContext(node) Then 304If SyntaxFacts.IsImplementedMember(node) Then 306ElseIf SyntaxFacts.IsHandlesEvent(node) Then 308ElseIf SyntaxFacts.IsHandlesContainer(node) Then 315ElseIf SyntaxFacts.IsHandlesProperty(node) Then 322ElseIf SyntaxFacts.IsInNamespaceOrTypeContext(node) Then 463If SyntaxFacts.IsInTypeOnlyContext(expression) Then 1719If expression.Kind = SyntaxKind.PredefinedType OrElse SyntaxFacts.IsInNamespaceOrTypeContext(expression) Then
Compilation\VisualBasicCompilation.vb (4)
2652Dim b As Integer = SyntaxFacts.IntegralLiteralCharacterValue(bytesText(i * 2)) * 16 + 2653SyntaxFacts.IntegralLiteralCharacterValue(bytesText(i * 2 + 1)) 2668Dim b As Byte = CByte(SyntaxFacts.IntegralLiteralCharacterValue(bytesText(i * 2)) * 16 + 2669SyntaxFacts.IntegralLiteralCharacterValue(bytesText(i * 2 + 1)))
Errors\ErrorFactories.vb (4)
71Return ErrorInfo(id, SyntaxFacts.GetText(syntaxToken.Kind)) 75Return ErrorInfo(id, SyntaxFacts.GetText(syntaxTokenKind)) 79Return ErrorInfo(id, SyntaxFacts.GetText(syntaxToken.Kind), type) 83Return ErrorInfo(id, SyntaxFacts.GetText(syntaxToken.Kind), type1, type2)
Generated\Syntax.xml.Internal.Generated.vb (168)
42701Debug.Assert(SyntaxFacts.IsEndBlockStatement(kind)) 42703Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsEndBlockStatementBlockKeyword(blockKeyword.Kind)) 42764Debug.Assert(nameKeyword IsNot Nothing AndAlso SyntaxFacts.IsOptionStatementNameKeyword(nameKeyword.Kind)) 43408Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 43435Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 43462Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 43494Debug.Assert(SyntaxFacts.IsSpecialConstraint(kind)) 43495Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 43642Debug.Assert(SyntaxFacts.IsMethodBlock(kind)) 43922Debug.Assert(SyntaxFacts.IsAccessorBlock(kind)) 44182Debug.Assert(SyntaxFacts.IsMethodStatement(kind)) 44183Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 44384Debug.Assert(SyntaxFacts.IsDeclareStatement(kind)) 44386Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 44518Debug.Assert(SyntaxFacts.IsDelegateStatement(kind)) 44520Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 44601Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsOperatorStatementOperatorToken(operatorToken.Kind)) 44832Debug.Assert(SyntaxFacts.IsAccessorStatement(kind)) 44833Debug.Assert(accessorKeyword IsNot Nothing AndAlso SyntaxFacts.IsAccessorStatementAccessorKeyword(accessorKeyword.Kind)) 44903Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsKeywordEventContainerKeyword(keyword.Kind)) 45473Debug.Assert(attributeModifier IsNot Nothing AndAlso SyntaxFacts.IsAttributeTargetAttributeModifier(attributeModifier.Kind)) 45739Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelStatementLabelToken(labelToken.Kind)) 45877Debug.Assert(SyntaxFacts.IsLabel(kind)) 45878Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelLabelToken(labelToken.Kind)) 45903Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 45928Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 45957Debug.Assert(SyntaxFacts.IsStopOrEndStatement(kind)) 45958Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 46254Debug.Assert(SyntaxFacts.IsExitStatement(kind)) 46256Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsExitStatementBlockKeyword(blockKeyword.Kind)) 46380Debug.Assert(SyntaxFacts.IsContinueStatement(kind)) 46382Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsContinueStatementBlockKeyword(blockKeyword.Kind)) 46967Debug.Assert(SyntaxFacts.IsOnErrorGoToStatement(kind)) 47560Debug.Assert(SyntaxFacts.IsRelationalCaseClause(kind)) 47561Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsRelationalCaseClauseOperatorToken(operatorToken.Kind)) 47787Debug.Assert(SyntaxFacts.IsDoLoopBlock(kind)) 47905Debug.Assert(SyntaxFacts.IsDoStatement(kind)) 48023Debug.Assert(SyntaxFacts.IsLoopStatement(kind)) 48117Debug.Assert(SyntaxFacts.IsWhileOrUntilClause(kind)) 48118Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(whileOrUntilKeyword.Kind)) 48830Debug.Assert(SyntaxFacts.IsAssignmentStatement(kind)) 48832Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsAssignmentStatementOperatorToken(operatorToken.Kind)) 48979Debug.Assert(SyntaxFacts.IsAddRemoveHandlerStatement(kind)) 48980Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(addHandlerOrRemoveHandlerKeyword.Kind)) 49185Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49221Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49257Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49293Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49329Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49365Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49401Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49443Debug.Assert(SyntaxFacts.IsLiteralExpression(kind)) 49444Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 49771Debug.Assert(SyntaxFacts.IsTypeOfExpression(kind)) 49774Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsTypeOfExpressionOperatorToken(operatorToken.Kind)) 49886Debug.Assert(SyntaxFacts.IsMemberAccessExpression(kind)) 49887Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsMemberAccessExpressionOperatorToken(operatorToken.Kind)) 50012Debug.Assert(SyntaxFacts.IsXmlMemberAccessExpression(kind)) 50274Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedCastExpressionKeyword(keyword.Kind)) 51049Debug.Assert(SyntaxFacts.IsBinaryExpression(kind)) 51051Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsBinaryExpressionOperatorToken(operatorToken.Kind)) 51196Debug.Assert(SyntaxFacts.IsUnaryExpression(kind)) 51197Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsUnaryExpressionOperatorToken(operatorToken.Kind)) 51366Debug.Assert(SyntaxFacts.IsSingleLineLambdaExpression(kind)) 51477Debug.Assert(SyntaxFacts.IsMultiLineLambdaExpression(kind)) 51585Debug.Assert(SyntaxFacts.IsLambdaHeader(kind)) 51586Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 52144Debug.Assert(SyntaxFacts.IsPartitionWhileClause(kind)) 52145Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind)) 52234Debug.Assert(SyntaxFacts.IsPartitionClause(kind)) 52235Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind)) 52480Debug.Assert(SyntaxFacts.IsOrdering(kind)) 52690Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringStartQuoteToken(startQuoteToken.Kind)) 52691Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringEndQuoteToken(endQuoteToken.Kind)) 52945Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedTypeKeyword(keyword.Kind)) 53161Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsCrefOperatorReferenceOperatorToken(operatorToken.Kind)) 53323Debug.Assert(SyntaxFacts.IsXmlTextToken(kind)) 53417Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeStartQuoteToken(startQuoteToken.Kind)) 53419Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeEndQuoteToken(endQuoteToken.Kind)) 53432Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeStartQuoteToken(startQuoteToken.Kind)) 53434Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeEndQuoteToken(endQuoteToken.Kind)) 53764Debug.Assert(SyntaxFacts.IsSyntaxTrivia(kind)) 53807Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind)) 53822Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind)) 54779Debug.Assert(SyntaxFacts.IsEndBlockStatement(kind)) 54781Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsEndBlockStatementBlockKeyword(blockKeyword.Kind)) 54842Debug.Assert(nameKeyword IsNot Nothing AndAlso SyntaxFacts.IsOptionStatementNameKeyword(nameKeyword.Kind)) 55486Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 55513Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 55540Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 55572Debug.Assert(SyntaxFacts.IsSpecialConstraint(kind)) 55573Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind)) 55720Debug.Assert(SyntaxFacts.IsMethodBlock(kind)) 56000Debug.Assert(SyntaxFacts.IsAccessorBlock(kind)) 56260Debug.Assert(SyntaxFacts.IsMethodStatement(kind)) 56261Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 56462Debug.Assert(SyntaxFacts.IsDeclareStatement(kind)) 56464Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 56596Debug.Assert(SyntaxFacts.IsDelegateStatement(kind)) 56598Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 56679Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsOperatorStatementOperatorToken(operatorToken.Kind)) 56910Debug.Assert(SyntaxFacts.IsAccessorStatement(kind)) 56911Debug.Assert(accessorKeyword IsNot Nothing AndAlso SyntaxFacts.IsAccessorStatementAccessorKeyword(accessorKeyword.Kind)) 56981Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsKeywordEventContainerKeyword(keyword.Kind)) 57551Debug.Assert(attributeModifier IsNot Nothing AndAlso SyntaxFacts.IsAttributeTargetAttributeModifier(attributeModifier.Kind)) 57817Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelStatementLabelToken(labelToken.Kind)) 57955Debug.Assert(SyntaxFacts.IsLabel(kind)) 57956Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelLabelToken(labelToken.Kind)) 57981Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 58006Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 58035Debug.Assert(SyntaxFacts.IsStopOrEndStatement(kind)) 58036Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind)) 58332Debug.Assert(SyntaxFacts.IsExitStatement(kind)) 58334Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsExitStatementBlockKeyword(blockKeyword.Kind)) 58458Debug.Assert(SyntaxFacts.IsContinueStatement(kind)) 58460Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsContinueStatementBlockKeyword(blockKeyword.Kind)) 59045Debug.Assert(SyntaxFacts.IsOnErrorGoToStatement(kind)) 59638Debug.Assert(SyntaxFacts.IsRelationalCaseClause(kind)) 59639Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsRelationalCaseClauseOperatorToken(operatorToken.Kind)) 59865Debug.Assert(SyntaxFacts.IsDoLoopBlock(kind)) 59983Debug.Assert(SyntaxFacts.IsDoStatement(kind)) 60101Debug.Assert(SyntaxFacts.IsLoopStatement(kind)) 60195Debug.Assert(SyntaxFacts.IsWhileOrUntilClause(kind)) 60196Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(whileOrUntilKeyword.Kind)) 60908Debug.Assert(SyntaxFacts.IsAssignmentStatement(kind)) 60910Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsAssignmentStatementOperatorToken(operatorToken.Kind)) 61057Debug.Assert(SyntaxFacts.IsAddRemoveHandlerStatement(kind)) 61058Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(addHandlerOrRemoveHandlerKeyword.Kind)) 61263Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61299Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61335Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61371Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61407Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61443Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61479Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61521Debug.Assert(SyntaxFacts.IsLiteralExpression(kind)) 61522Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind)) 61849Debug.Assert(SyntaxFacts.IsTypeOfExpression(kind)) 61852Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsTypeOfExpressionOperatorToken(operatorToken.Kind)) 61964Debug.Assert(SyntaxFacts.IsMemberAccessExpression(kind)) 61965Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsMemberAccessExpressionOperatorToken(operatorToken.Kind)) 62090Debug.Assert(SyntaxFacts.IsXmlMemberAccessExpression(kind)) 62352Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedCastExpressionKeyword(keyword.Kind)) 63127Debug.Assert(SyntaxFacts.IsBinaryExpression(kind)) 63129Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsBinaryExpressionOperatorToken(operatorToken.Kind)) 63274Debug.Assert(SyntaxFacts.IsUnaryExpression(kind)) 63275Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsUnaryExpressionOperatorToken(operatorToken.Kind)) 63444Debug.Assert(SyntaxFacts.IsSingleLineLambdaExpression(kind)) 63555Debug.Assert(SyntaxFacts.IsMultiLineLambdaExpression(kind)) 63663Debug.Assert(SyntaxFacts.IsLambdaHeader(kind)) 63664Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(subOrFunctionKeyword.Kind)) 64222Debug.Assert(SyntaxFacts.IsPartitionWhileClause(kind)) 64223Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind)) 64312Debug.Assert(SyntaxFacts.IsPartitionClause(kind)) 64313Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind)) 64558Debug.Assert(SyntaxFacts.IsOrdering(kind)) 64768Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringStartQuoteToken(startQuoteToken.Kind)) 64769Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringEndQuoteToken(endQuoteToken.Kind)) 65023Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedTypeKeyword(keyword.Kind)) 65239Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsCrefOperatorReferenceOperatorToken(operatorToken.Kind)) 65401Debug.Assert(SyntaxFacts.IsXmlTextToken(kind)) 65495Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeStartQuoteToken(startQuoteToken.Kind)) 65497Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeEndQuoteToken(endQuoteToken.Kind)) 65510Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeStartQuoteToken(startQuoteToken.Kind)) 65512Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeEndQuoteToken(endQuoteToken.Kind)) 65842Debug.Assert(SyntaxFacts.IsSyntaxTrivia(kind)) 65885Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind)) 65900Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind))
Generated\Syntax.xml.Main.Generated.vb (40)
6561If Not SyntaxFacts.IsEndBlockStatement(kind) Then 8197If Not SyntaxFacts.IsSpecialConstraint(kind) Then 8413If Not SyntaxFacts.IsMethodBlock(kind) Then 8963If Not SyntaxFacts.IsAccessorBlock(kind) Then 9488If Not SyntaxFacts.IsMethodStatement(kind) Then 9985If Not SyntaxFacts.IsDeclareStatement(kind) Then 10381If Not SyntaxFacts.IsDelegateStatement(kind) Then 11222If Not SyntaxFacts.IsAccessorStatement(kind) Then 13238If Not SyntaxFacts.IsLabel(kind) Then 13325If Not SyntaxFacts.IsStopOrEndStatement(kind) Then 13670If Not SyntaxFacts.IsExitStatement(kind) Then 13852If Not SyntaxFacts.IsContinueStatement(kind) Then 15351If Not SyntaxFacts.IsOnErrorGoToStatement(kind) Then 15601If Not SyntaxFacts.IsResumeStatement(kind) Then 15936If Not SyntaxFacts.IsCaseBlock(kind) Then 16084If Not SyntaxFacts.IsCaseStatement(kind) Then 17440If Not SyntaxFacts.IsRelationalCaseClause(kind) Then 18013If Not SyntaxFacts.IsDoLoopBlock(kind) Then 18219If Not SyntaxFacts.IsDoStatement(kind) Then 18405If Not SyntaxFacts.IsLoopStatement(kind) Then 18765If Not SyntaxFacts.IsWhileOrUntilClause(kind) Then 23069If Not SyntaxFacts.IsAssignmentStatement(kind) Then 23976If Not SyntaxFacts.IsAddRemoveHandlerStatement(kind) Then 24557If Not SyntaxFacts.IsReDimStatement(kind) Then 25051If Not SyntaxFacts.IsLiteralExpression(kind) Then 25895If Not SyntaxFacts.IsTypeOfExpression(kind) Then 26251If Not SyntaxFacts.IsMemberAccessExpression(kind) Then 26539If Not SyntaxFacts.IsXmlMemberAccessExpression(kind) Then 33947If Not SyntaxFacts.IsBinaryExpression(kind) Then 34821If Not SyntaxFacts.IsUnaryExpression(kind) Then 36260If Not SyntaxFacts.IsSingleLineLambdaExpression(kind) Then 36677If Not SyntaxFacts.IsMultiLineLambdaExpression(kind) Then 36889If Not SyntaxFacts.IsLambdaHeader(kind) Then 38615If Not SyntaxFacts.IsPartitionWhileClause(kind) Then 39070If Not SyntaxFacts.IsPartitionClause(kind) Then 40037If Not SyntaxFacts.IsOrdering(kind) Then 41832If Not SyntaxFacts.IsXmlTextToken(kind) Then 42922If Not SyntaxFacts.IsSyntaxTrivia(kind) Then 43415If Not SyntaxFacts.IsIfDirectiveTrivia(kind) Then 45875Return SyntaxFacts.GetText(kind)
OptionsValidator.vb (8)
108If allowEscaping AndAlso SyntaxFacts.ReturnFullWidthOrSelf(name(start)) = SyntaxFacts.FULLWIDTH_LEFT_SQUARE_BRACKET Then 109If SyntaxFacts.ReturnFullWidthOrSelf(name(lastIdentifierCharacterIndex)) <> SyntaxFacts.FULLWIDTH_RIGHT_SQUARE_BRACKET Then 116If Not SyntaxFacts.IsIdentifierStartCharacter(name(start)) Then 121If ([end] - start) = 1 AndAlso SyntaxFacts.ReturnFullWidthOrSelf(name(start)) = SyntaxFacts.FULLWIDTH_LOW_LINE Then 126If Not SyntaxFacts.IsIdentifierPartCharacter(name(i)) Then
Parser\BlockContexts\BlockContext.vb (4)
45_isWithinSingleLineLambda = SyntaxFacts.IsSingleLineLambdaExpression(_kind) 49_isWithinMultiLineLambda = SyntaxFacts.IsMultiLineLambdaExpression(_kind) 387ElseIf SyntaxFacts.IsEndBlockLoopOrNextStatement(kind) Then 438If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\DeclarationContext.vb (1)
237If Not SyntaxFacts.IsEndBlockLoopOrNextStatement(node.Kind) Then
Parser\BlockContexts\ExecutableStatementContext.vb (8)
40Dim declarationContext = FindNearest(Function(s) SyntaxFacts.IsMethodBlock(s) OrElse 43SyntaxFacts.IsAccessorBlock(s)) 51node = Parser.ReportSyntaxError(node, ERRID.ERR_InvInsideBlock, SyntaxFacts.GetBlockName(BlockKind)) 63Dim declarationContext = FindNearest(Function(s) SyntaxFacts.IsMethodBlock(s) OrElse 66SyntaxFacts.IsAccessorBlock(s) OrElse 67SyntaxFacts.IsMultiLineLambdaExpression(s) OrElse 68SyntaxFacts.IsSingleLineLambdaExpression(s)) 75node = Parser.ReportSyntaxError(node, ERRID.ERR_InvInsideBlock, SyntaxFacts.GetBlockName(BlockKind))
Parser\BlockContexts\IfPartContext.vb (1)
78If Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\LambdaContext.vb (1)
19Debug.Assert(SyntaxFacts.IsMultiLineLambdaExpression(BlockKind))
Parser\BlockContexts\MethodBlockContext.vb (4)
20Debug.Assert(SyntaxFacts.IsMethodBlock(contextKind) OrElse 23SyntaxFacts.IsAccessorBlock(contextKind) OrElse 24SyntaxFacts.IsSingleLineLambdaExpression(contextKind) OrElse 25SyntaxFacts.IsMultiLineLambdaExpression(contextKind))
Parser\BlockContexts\SingleLineElseContext.vb (1)
32If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\SingleLineIfBlockContext.vb (1)
32If ifStmt.ThenKeyword IsNot Nothing AndAlso Not SyntaxFacts.IsTerminator(Parser.CurrentToken.Kind) Then
Parser\BlockContexts\SingleLineLambdaContext.vb (1)
20Debug.Assert(SyntaxFacts.IsSingleLineLambdaExpression(BlockKind))
Parser\ParseConditional.vb (3)
360If Not SyntaxFacts.IsHexDigit(ch) Then 403If Not SyntaxFacts.IsTerminator(CurrentToken.Kind) Then 416If SyntaxFacts.IsTerminator(CurrentToken.Kind) Then
Parser\ParseExpression.vb (2)
519If SyntaxFacts.IsFullWidth(ch) Then 770Debug.Assert(SyntaxFacts.IsPredefinedCastExpressionKeyword(CurrentToken.Kind), "ParseCastExpression called with the wrong token.")
Parser\Parser.vb (21)
842If SyntaxFacts.CanStartSpecifierDeclaration(possibleDeclarationStart) OrElse 843SyntaxFacts.IsSpecifier(possibleDeclarationStart) Then 1110If SyntaxFacts.IsSpecifier(nextToken.Kind) OrElse SyntaxFacts.CanStartSpecifierDeclaration(nextToken.Kind) Then 1992If SyntaxFacts.IsSpecifier(nextToken.Kind) OrElse SyntaxFacts.CanStartSpecifierDeclaration(nextToken.Kind) Then 2001If SyntaxFacts.IsSpecifier(nextToken.Kind) OrElse 2002SyntaxFacts.CanStartSpecifierDeclaration(nextToken.Kind) Then 2689customModifierError = SyntaxFacts.IsSpecifier(nextToken.Kind) OrElse SyntaxFacts.CanStartSpecifierDeclaration(nextToken.Kind) 2697If SyntaxFacts.IsSpecifier(identifierStart.Kind) Then 2755If SyntaxFacts.IsPredefinedTypeOrVariant(Token.Kind) Then 2800If SyntaxFacts.IsPredefinedTypeKeyword(Start.Kind) Then 3036If _evaluatingConditionCompilationExpression AndAlso Not SyntaxFacts.IsPredefinedTypeOrVariant(start.Kind) Then 3946If SyntaxFacts.IsOperatorStatementOperatorToken(operatorKind) Then 3953If SyntaxFacts.IsOperator(operatorKind) Then 5413Debug.Assert(lessThanText = "<" OrElse lessThanText = SyntaxFacts.FULLWIDTH_LESS_THAN_SIGN_STRING) 5414Debug.Assert(greaterThanText = ">" OrElse greaterThanText = SyntaxFacts.FULLWIDTH_GREATER_THAN_SIGN_STRING) 5587Return SyntaxFacts.GetBinaryExpression(t.Kind) 5778Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind) OrElse CurrentToken.Kind = SyntaxKind.EmptyToken) 5806Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind))
Parser\ParseScan.vb (3)
68Return SyntaxFacts.IsTerminator(t.Kind) 153If SyntaxFacts.IsPredefinedTypeOrVariant(t.Kind) Then 425Return Not SyntaxFacts.IsTerminator(kind) AndAlso kind <> SyntaxKind.EmptyToken
Parser\ParseStatement.vb (5)
57Dim loopContext = Context.FindNearest(AddressOf SyntaxFacts.SupportsContinueStatement) 157Dim loopContext = Context.FindNearest(AddressOf SyntaxFacts.SupportsExitStatement) 264If StartCase = SyntaxKind.IsKeyword OrElse SyntaxFacts.IsRelationalOperator(StartCase) Then 270If SyntaxFacts.IsRelationalOperator(CurrentToken.Kind) Then 1095If SyntaxFacts.IsAssignmentStatementOperatorToken(CurrentToken.Kind) Then
Parser\ParseXml.vb (3)
1098If SyntaxFacts.IsPredefinedTypeKeyword(Me.CurrentToken.Kind) Then 1274If SyntaxFacts.IsOperatorStatementOperatorToken(operatorKind) Then 1317Debug.Assert(Not SyntaxFacts.IsPredefinedTypeKeyword(CurrentToken.Kind))
Scanner\Directives.vb (1)
16Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Scanner\KeywordTable.vb (3)
314If SyntaxFacts.IsFullWidth(ch) Then 315ch = SyntaxFacts.MakeHalfWidth(ch) 376Dim Name = SyntaxFacts.GetText(Token)
Scanner\Scanner.vb (7)
19Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 724If position = 0 OrElse SyntaxFacts.IsNewLine(text(position - 1)) Then 790While CanGet() AndAlso SyntaxFacts.IsNewLine(Peek()) 805If SyntaxFacts.IsNewLine(ch) Then 1482If SyntaxFacts.IsIdentifierStartCharacter(c) Then 1591If SyntaxFacts.IsContextualKeyword(tokenType) Then 2683Return (_isScanningForExpressionCompiler AndAlso c = "$"c) OrElse SyntaxFacts.IsIdentifierStartCharacter(c)
Scanner\ScannerInterpolatedString.vb (1)
10Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Scanner\ScannerXml.vb (1)
12Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Scanner\TokenFactories.vb (1)
12Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Scanner\TokenStream.vb (1)
366If tk.Width = 0 AndAlso SyntaxFacts.IsTerminator(tk.Kind) Then
Scanner\XmlDocComments.vb (1)
12Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Scanner\XmlTokenFactories.vb (1)
11Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Semantics\Operators.vb (3)
336diagnosticsOpt.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OperatorRequiresBoolReturnType1, SyntaxFacts.GetText(SyntaxKind.IsTrueKeyword)), method.Locations(0)) 343diagnosticsOpt.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OperatorRequiresBoolReturnType1, SyntaxFacts.GetText(SyntaxKind.IsFalseKeyword)), method.Locations(0)) 362SyntaxFacts.GetText(If(opInfo.BinaryOperatorKind = BinaryOperatorKind.LeftShift,
SourceGeneration\VisualBasicSyntaxHelper.vb (1)
26Return SyntaxFacts.IsValidIdentifier(name)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
351ElseIf SyntaxFacts.IsKeywordKind(tokenKind) Then
SymbolDisplay\SymbolDisplayVisitor.vb (9)
73If CaseInsensitiveComparison.Equals(SyntaxFacts.GetText(SyntaxKind.REMKeyword), text) OrElse 74CaseInsensitiveComparison.Equals(SyntaxFacts.GetText(SyntaxKind.NewKeyword), text) Then 111If SyntaxFacts.GetKeywordKind(identifier) <> SyntaxKind.None Then 119Dim contextualKeywordKind As SyntaxKind = SyntaxFacts.GetContextualKeywordKind(identifier) 237builder.Add(CreatePart(SymbolDisplayPartKind.Keyword, symbol, SyntaxFacts.GetText(SyntaxKind.GlobalKeyword), True)) 240builder.Add(CreatePart(SymbolDisplayPartKind.Keyword, symbol, SyntaxFacts.GetText(SyntaxKind.GlobalKeyword), True)) 297builder.Add(CreatePart(SymbolDisplayPartKind.Operator, Nothing, SyntaxFacts.GetText(operatorKind), False)) 301builder.Add(CreatePart(SymbolDisplayPartKind.Punctuation, Nothing, SyntaxFacts.GetText(punctuationKind), False)) 309builder.Add(CreatePart(SymbolDisplayPartKind.Keyword, Nothing, SyntaxFacts.GetText(keywordKind), False))
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
15Return SyntaxFacts.IsInNamespaceOrTypeContext(TryCast(startNode, ExpressionSyntax)) OrElse Me.inNamespaceOrType
Symbols\MethodKindExtensions.vb (5)
17Return SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword) 20Return SyntaxFacts.GetText(SyntaxKind.RaiseEventKeyword) 23Return SyntaxFacts.GetText(SyntaxKind.RemoveHandlerKeyword) 26Return SyntaxFacts.GetText(SyntaxKind.GetKeyword) 29Return SyntaxFacts.GetText(SyntaxKind.SetKeyword)
Symbols\Source\OverrideHidingHelper.vb (1)
461SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(associatedSymbol.Name)),
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
3708SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(nameOfThePair)),
Symbols\Source\SourceMethodSymbol.vb (2)
165SyntaxFacts.GetText(token.Kind)) 366binder.ReportDiagnostic(diagBag, syntax.OperatorToken, paramCountMismatchERRID, SyntaxFacts.GetText(syntax.OperatorToken.Kind))
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (4)
331SyntaxFacts.GetText(SyntaxKind.InterfaceKeyword) & " " & interfaceName, 333SyntaxFacts.GetText(SyntaxKind.ClassKeyword), 346SyntaxFacts.GetText(SyntaxKind.InterfaceKeyword), 348SyntaxFacts.GetText(SyntaxKind.ClassKeyword),
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
47If SyntaxFacts.GetKeywordKind(name) <> SyntaxKind.None Then
Symbols\Symbol.vb (2)
562Return Not String.IsNullOrEmpty(Me.Name) AndAlso SyntaxFacts.IsIdentifierStartCharacter(Me.Name(0)) 564Return SyntaxFacts.IsValidIdentifier(Me.Name)
Symbols\SymbolExtensions.vb (2)
90Return SyntaxFacts.GetText(SyntaxKind.WriteOnlyKeyword) 92Return SyntaxFacts.GetText(SyntaxKind.ReadOnlyKeyword)
Symbols\TypeParameterConstraint.vb (1)
65Return SyntaxFacts.GetText(ToSyntaxKind(Kind))
Syntax\BeginOfBlockSyntaxReference.vb (1)
20Return SyntaxFacts.BeginOfBlockStatementIfAny(reference.GetSyntax(cancellationToken))
Syntax\InternalSyntax\SyntaxFactory.vb (1)
63Return SyntaxToken.Create(kind, leading, trailing, If(text Is Nothing, SyntaxFacts.GetText(kind), text))
Syntax\InternalSyntax\SyntaxToken.vb (1)
458Dim tokenText = If(text Is Nothing, SyntaxFacts.GetText(kind), text)
Syntax\SyntaxNodeFactories.vb (1)
14Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Syntax\SyntaxNormalizer.vb (5)
246trivia = SyntaxFactory.DocumentationCommentExteriorTrivia(SyntaxFacts.GetText(SyntaxKind.DocumentationCommentExteriorTrivia)) 331If SyntaxFacts.IsPreprocessorDirective(trivia.Kind) Then 355Return Not SyntaxFacts.IsPreprocessorDirective(trivia.Kind) 498If SyntaxFacts.IsRelationalCaseClause(token.Parent.Kind()) OrElse 499SyntaxFacts.IsRelationalCaseClause(nextToken.Parent.Kind()) Then
Syntax\VisualBasicSyntaxTree.vb (1)
387If Not SyntaxFacts.IsXmlSyntax(node.Kind()) Then
VisualBasicExtensions.vb (4)
347Return SyntaxFacts.IsKeywordKind(token.Kind()) 357Return SyntaxFacts.IsReservedKeyword(token.Kind()) 366Return SyntaxFacts.IsContextualKeyword(token.Kind()) 376Return SyntaxFacts.IsPreprocessorKeyword(token.Kind())
VisualBasicParseOptions.vb (2)
9Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 255If Not IsValidIdentifier(symbol.Key) OrElse SyntaxFacts.GetKeywordKind(symbol.Key) <> SyntaxKind.None Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (29)
AdjustSpaceFormattingRule.vb (1)
152If SyntaxFacts.IsPredefinedCastExpressionKeyword(previousToken.Kind) Then
ElasticTriviaFormattingRule.vb (1)
363Return list.Sum(Function(t) t.ToFullString().Replace(vbCrLf, vbCr).OfType(Of Char).Count(Function(c) SyntaxFacts.IsNewLine(c)))
SpeculationAnalyzer.vb (4)
113Dim isInNamespaceOrTypeContext = SyntaxFacts.IsInNamespaceOrTypeContext(TryCast(originalNode, ExpressionSyntax)) 354If SyntaxFacts.IsAssignmentStatementOperatorToken(originalAssignmentStatement.OperatorToken.Kind()) Then 504If SyntaxFacts.IsAssignmentStatementOperatorToken(operatorTokenKind) AndAlso 536Return SyntaxFacts.IsInNamespaceOrTypeContext(node)
StructuredTriviaFormattingRule.vb (1)
26If previousToken.Kind = SyntaxKind.HashToken AndAlso SyntaxFacts.IsPreprocessorKeyword(CType(currentToken.Kind, SyntaxKind)) Then
SyntaxNodeExtensions.vb (5)
230Return SyntaxFacts.IsMultiLineLambdaExpression(node.Kind()) 284Dim hasLeadingDirective = node.GetLeadingTrivia().Any(Function(t) SyntaxFacts.IsPreprocessorDirective(t.Kind)) 830SyntaxFacts.IsAssignmentStatement(node.Kind) 1103If SyntaxFacts.IsSingleLineLambdaExpression(current.Kind) OrElse 1104SyntaxFacts.IsMultiLineLambdaExpression(current.Kind) Then
SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
TriviaDataFactory.Analyzer.vb (1)
55Contract.ThrowIfFalse(SyntaxFacts.IsPreprocessorDirective(trivia.Kind))
TriviaDataFactory.CodeShapeAnalyzer.vb (2)
58If trivia.Kind = SyntaxKind.RegionDirectiveTrivia OrElse trivia.Kind = SyntaxKind.EndRegionDirectiveTrivia OrElse SyntaxFacts.IsPreprocessorDirective(trivia.Kind) Then 256If Not SyntaxFacts.IsPreprocessorDirective(trivia.Kind) Then
TriviaDataFactory.LineContinuationTrivia.vb (1)
30builder.Append(SyntaxFacts.GetText(SyntaxKind.LineContinuationTrivia))
VisualBasicOrderModifiersHelper.vb (2)
17Dim kind = SyntaxFacts.GetKeywordKind(trimmed) 18Return If(kind = SyntaxKind.None, SyntaxFacts.GetContextualKeywordKind(trimmed), kind)
VisualBasicSyntaxFacts.vb (7)
13Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 100Dim keywordKind = SyntaxFacts.GetKeywordKind(identifier) 451Return SyntaxFacts.GetText(CType(kind, SyntaxKind)) 455Return SyntaxFacts.IsIdentifierPartCharacter(c) 459Return SyntaxFacts.IsIdentifierStartCharacter(c) 577Return SyntaxFacts.IsInNamespaceOrTypeContext(node) 1443Return SyntaxFacts.IsPreprocessorDirective(trivia.Kind())
VisualBasicTriviaFormatter.vb (3)
44Return Char.IsWhiteSpace(ch) OrElse SyntaxFacts.IsWhitespace(ch) 48Return SyntaxFacts.IsNewLine(ch) 108If SyntaxFacts.IsPreprocessorDirective(trivia2.Kind) Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (13)
CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
ExpressionSyntaxExtensions.vb (1)
296Dim identifierValue = SyntaxFacts.MakeHalfWidthIdentifier(identifier.Identifier.ValueText)
SpecialFormattingOperation.vb (2)
65If SyntaxFacts.AllowsTrailingImplicitLineContinuation(endToken) OrElse 66SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken) OrElse
StringExtensions.vb (3)
9Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 22Dim halfWidthValueText = SyntaxFacts.MakeHalfWidthIdentifier(identifierText) 35Dim keywordKind = SyntaxFacts.GetKeywordKind(text)
SymbolDisplayPartExtensions.vb (1)
20If SyntaxFacts.GetKeywordKind(text) <> SyntaxKind.None Then
SyntaxKindSet.vb (1)
8Public ReadOnly AllOperators As ISet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From
SyntaxTokenExtensions.vb (1)
61SyntaxFacts.AllowsTrailingImplicitLineContinuation(token)
VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (1)
85If Not SyntaxFacts.IsWhitespace(c) Then
VisualBasicSimplificationHelpers.vb (2)
24If SyntaxFacts.GetKeywordKind(unescapedIdentifier) = SyntaxKind.None AndAlso SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) = SyntaxKind.None Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
AutomaticCompletion\AutomaticLineEnderCommandHandler.vb (2)
97If SyntaxFacts.AllowsTrailingImplicitLineContinuation(CType(nonMissingToken, SyntaxToken)) Then 117Return If(SyntaxFacts.AllowsLeadingImplicitLineContinuation(CType(nextToken, SyntaxToken)), Nothing, " _")
EndConstructGeneration\EndConstructStatementVisitor_CustomEvents.vb (2)
43Return {aligningWhitespace & SyntaxFacts.GetText(kind) & "(value As " & type.Type.ToMinimalDisplayString(_state.SemanticModel, position, SymbolDisplayFormats.NameFormat) & ")", 45aligningWhitespace & "End " & SyntaxFacts.GetText(kind)}
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
Recommendations\Expressions\CastOperatorsKeywordRecommenderTests.vb (1)
17keywords.Add(SyntaxFacts.GetText(k))
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (7)
CompilationContext.vb (2)
921If Not SyntaxFacts.IsIdentifierStartCharacter(ch) Then 935ElseIf SyntaxFacts.IsIdentifierPartCharacter(ch) Then
EvaluationContext.vb (1)
618If nextNamePart.All(AddressOf SyntaxFacts.IsIdentifierPartCharacter) Then
SyntaxHelpers.vb (4)
95If SyntaxFacts.IsWhitespace(c) OrElse c = ","c Then 132If Not token.All(AddressOf SyntaxFacts.IsIdentifierPartCharacter) Then 237If SyntaxFacts.IsKeywordKind(SyntaxFacts.GetKeywordKind(identifier)) Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.UnitTests (5)
VisualBasicFormatter.TypeNames.vb (2)
16Return SyntaxFacts.GetKeywordKind(identifier) <> SyntaxKind.None OrElse SyntaxFacts.GetContextualKeywordKind(identifier) <> SyntaxKind.None
VisualBasicFormatter.vb (3)
29Return SyntaxFacts.IsValidIdentifier(name) 33Return SyntaxFacts.IsIdentifierPartCharacter(c) 41Return SyntaxFacts.IsWhitespace(c)
Microsoft.CodeAnalysis.VisualBasic.Features (75)
BraceMatching\AbstractVisualBasicBraceMatcher.vb (2)
13MyBase.New(New BraceCharacterAndKind(SyntaxFacts.GetText(openBrace)(0), openBrace), 14New BraceCharacterAndKind(SyntaxFacts.GetText(closeBrace)(0), closeBrace))
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (6)
202Return String.Format(VBFeaturesResources.Insert_the_missing_0, "End " + SyntaxFacts.GetText(endBlockSyntax.BlockKeyword.Kind)) 207Return String.Format(VBFeaturesResources.Insert_the_missing_0, SyntaxFacts.GetText(SyntaxKind.LoopKeyword)) 210Return String.Format(VBFeaturesResources.Insert_the_missing_0, SyntaxFacts.GetText(SyntaxKind.NextKeyword)) 238stringToAppend = vbCrLf + "End " + SyntaxFacts.GetText(endBlock.BlockKeyword.Kind) + vbCrLf 243stringToAppend = vbCrLf & SyntaxFacts.GetText(nextStatement.NextKeyword.Kind) & vbCrLf 248stringToAppend = vbCrLf & SyntaxFacts.GetText(loopStatement.LoopKeyword.Kind) & vbCrLf
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.AddKeywordCodeAction.vb (1)
35Return String.Format(VBFeaturesResources.Insert_0, SyntaxFacts.GetText(BlockKindToKeywordKind(_createBlockKind)))
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (1)
34Return String.Format(FeaturesResources.Change_0_to_1, _invalidToken.ValueText, SyntaxFacts.GetText(BlockKindToKeywordKind(_createBlockKind)))
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (1)
28Return String.Format(FeaturesResources.Change_0_to_1, _invalidToken.ValueText, SyntaxFacts.GetText(BlockKindToKeywordKind(_blockKind)))
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (1)
44If SyntaxFacts.GetKeywordKind(text) <> SyntaxKind.None Then
Completion\CompletionProviders\CompletionUtilities.vb (3)
32Return SyntaxFacts.IsIdentifierStartCharacter(ch) 36Return SyntaxFacts.IsIdentifierStartCharacter(ch) OrElse SyntaxFacts.IsIdentifierPartCharacter(ch)
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
84SyntaxFacts.IsIdentifierStartCharacter(text(characterPosition)) AndAlso
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (9)
274Yield SyntaxFacts.GetText(SyntaxKind.NothingKeyword) 275Yield SyntaxFacts.GetText(SyntaxKind.SharedKeyword) 276Yield SyntaxFacts.GetText(SyntaxKind.OverridableKeyword) 277Yield SyntaxFacts.GetText(SyntaxKind.TrueKeyword) 278Yield SyntaxFacts.GetText(SyntaxKind.FalseKeyword) 279Yield SyntaxFacts.GetText(SyntaxKind.MustInheritKeyword) 280Yield SyntaxFacts.GetText(SyntaxKind.NotOverridableKeyword) 281Yield SyntaxFacts.GetText(SyntaxKind.AsyncKeyword) 282Yield SyntaxFacts.GetText(SyntaxKind.AwaitKeyword)
Completion\KeywordRecommenders\Declarations\EndBlockKeywordRecommender.vb (3)
36Select SyntaxFacts.GetText(keyword) 59Function(k) New RecommendedKeyword("End " & SyntaxFacts.GetText(k), GetToolTipForKeyword(SyntaxFacts.GetText(k))))
Completion\KeywordRecommenders\Declarations\EventKeywordRecommender.vb (1)
36If targetToken.Kind = SyntaxKind.IdentifierToken AndAlso SyntaxFacts.GetContextualKeywordKind(targetToken.GetIdentifierText()) = SyntaxKind.CustomKeyword Then
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (2)
58If (SyntaxFacts.GetContextualKeywordKind(text) = SyntaxKind.FromKeyword OrElse SyntaxFacts.GetContextualKeywordKind(text) = SyntaxKind.AggregateKeyword) Then
Completion\KeywordRecommenders\Expressions\CastOperatorsKeywordRecommender.vb (1)
41String.Format(VBFeaturesResources._0_function, SyntaxFacts.GetText(keyword)),
Completion\KeywordRecommenders\Expressions\MeKeywordRecommender.vb (3)
39Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running, matchPriority:=priority)) 46Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running)) 52Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running))
Completion\KeywordRecommenders\Expressions\MyBaseKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MyBaseKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_base_class_of_the_current_class_instance_You_cannot_use_MyBase_to_call_MustOverride_base_methods))
Completion\KeywordRecommenders\Expressions\MyClassKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MyClassKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_class_instance_members_as_originally_implemented_ignoring_any_derived_class_overrides))
Completion\KeywordRecommenders\RecommendationHelpers.vb (1)
157Return New RecommendedKeyword(SyntaxFacts.GetText(kind), glyph,
Completion\Providers\ContextVariableArgumentProvider.vb (1)
25Return SyntaxFacts.GetText(SyntaxKind.MeKeyword)
Debugging\BreakpointResolver.vb (1)
24Return If(s_identifierComparer.Equals(name, SyntaxFacts.GetText(SyntaxKind.NewKeyword)),
EditAndContinue\BreakpointSpans.vb (1)
38If Not SyntaxFacts.IsWhitespace(text(i)) Then
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
96Return typeDeclaration.GetModifiers().Any(Function(m) SyntaxFacts.IsAccessibilityModifier(m.Kind()))
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.CallSiteContainerRewriter.vb (1)
354Dim trivia = SyntaxFactory.ColonTrivia(SyntaxFacts.GetText(SyntaxKind.ColonTrivia))
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (2)
381Dim bracket = SyntaxFacts.MakeHalfWidthIdentifier(name.First) = "[" AndAlso SyntaxFacts.MakeHalfWidthIdentifier(name.Last) = "]"
GenerateType\VisualBasicGenerateTypeService.vb (3)
122If Not SyntaxFacts.IsInNamespaceOrTypeContext(nameOrMemberAccessExpression) Then 150Not SyntaxFacts.IsInNamespaceOrTypeContext(simpleName) Then 181If SyntaxFacts.IsInNamespaceOrTypeContext(nameOrMemberAccessExpression) Then
InvertLogical\VisualBasicInvertLogicalCodeRefactoringProvider.vb (2)
24SyntaxFacts.GetText(SyntaxKind.AndAlsoKeyword), 25SyntaxFacts.GetText(SyntaxKind.OrElseKeyword))
LanguageServices\VisualBasicStructuralTypeDisplayService.vb (8)
32members.Add(Keyword(SyntaxFacts.GetText(SyntaxKind.NewKeyword))) 34members.Add(Keyword(SyntaxFacts.GetText(SyntaxKind.WithKeyword))) 36members.Add(Punctuation(SyntaxFacts.GetText(SyntaxKind.OpenBraceToken))) 41members.Add(Punctuation(SyntaxFacts.GetText(SyntaxKind.CommaToken))) 48members.Add(Keyword(SyntaxFacts.GetText(SyntaxKind.KeyKeyword))) 52members.Add(Punctuation(SyntaxFacts.GetText(SyntaxKind.DotToken))) 55members.Add(Keyword(SyntaxFacts.GetText(SyntaxKind.AsKeyword))) 61members.Add(Punctuation(SyntaxFacts.GetText(SyntaxKind.CloseBraceToken)))
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (1)
119Return c = vbCr OrElse c = vbLf OrElse SyntaxFacts.IsNewLine(c)
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (1)
117If SyntaxFacts.GetContextualKeywordKind(token.ToString()) = SyntaxKind.MidKeyword Then
ReplaceDocCommentTextWithTag\VisualBasicReplaceDocCommentTextWithTagCodeRefactoringProvider.vb (4)
31Return SyntaxFacts.IsKeywordKind(SyntaxFacts.GetKeywordKind(text)) OrElse SyntaxFacts.IsContextualKeyword(SyntaxFacts.GetContextualKeywordKind(text))
SignatureHelp\AbstractVisualBasicSignatureHelpProvider.vb (2)
18Return New SymbolDisplayPart(SymbolDisplayPartKind.Keyword, Nothing, SyntaxFacts.GetText(kind)) 22Return New SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, Nothing, SyntaxFacts.GetText(kind))
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
81Dim namespacesOrTypesOnly = SyntaxFacts.IsInNamespaceOrTypeContext(genericName)
TaskList\VisualBasicTaskListService.vb (5)
43Return SyntaxFacts.MakeHalfWidthIdentifier(message) 47Return SyntaxFacts.IsIdentifierPartCharacter(ch) 59If SyntaxFacts.GetKeywordKind(remText) = SyntaxKind.REMKeyword Then 87If Not SyntaxFacts.IsWhitespace(message(i)) Then 105Return SyntaxFacts.IsPreprocessorDirective(CType(trivia.RawKind, SyntaxKind)) AndAlso
VisualBasicOrderModifiersHelper.vb (2)
17Dim kind = SyntaxFacts.GetKeywordKind(trimmed) 18Return If(kind = SyntaxKind.None, SyntaxFacts.GetContextualKeywordKind(trimmed), kind)
VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (1)
85If Not SyntaxFacts.IsWhitespace(c) Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (10)
Binding\Binder_Statements_Tests.vb (1)
4889End Module]]>.Value.Replace("~"c, SyntaxFacts.FULLWIDTH_COLON)
DeclaringSyntaxNodeTests.vb (2)
43Assert.False(SyntaxFacts.IsBlockStatement(node, beginStatement, beginTerminator, body, endStatement)) 94Assert.False(SyntaxFacts.IsBlockStatement(node, beginStatement, beginTerminator, body, endStatement))
Semantics\BinaryOperators.vb (2)
905Dim opTokens = (From op In operators Select SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(op))).ToArray() 1211SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(
Semantics\GetExtendedSemanticInfoTests.vb (2)
9820Assert.[False](SyntaxFacts.IsAttributeName((DirectCast(semanticInfo.Symbol, SourceNamedTypeSymbol)).SyntaxReferences.First().GetSyntax()), "IsAttributeName can be true only for alias name being qualified") 9860Assert.[False](SyntaxFacts.IsAttributeName((DirectCast(semanticInfo.Symbol, SourceNamedTypeSymbol)).SyntaxReferences.First().GetSyntax()), "IsAttributeName can be true only for alias name being qualified")
Semantics\InterpolatedStringTests.vb (1)
6Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Semantics\UnaryOperators.vb (2)
602Dim opTokens = (From op In operators Select SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(op))).ToArray() 751SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(op)),
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (433)
Parser\ParseAsyncTests.vb (2)
283Assert.Equal(4, lambdas.Count(Function(l) SyntaxFacts.IsSingleLineLambdaExpression(l.Kind))) 296Assert.Equal(3, lambdas.Count(Function(l) SyntaxFacts.IsMultiLineLambdaExpression(l.Kind)))
Parser\ParseAttributes.vb (1)
9Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Parser\ParseDirectives.vb (3)
490]]>.Value.Replace("_"c, SyntaxFacts.FULLWIDTH_LOW_LINE), 1495]]>.Value.Replace("#"c, SyntaxFacts.FULLWIDTH_NUMBER_SIGN), 1503]]>.Value.Replace("#"c, SyntaxFacts.FULLWIDTH_NUMBER_SIGN))
Parser\ParseErrorTests.vb (5)
2758]]>.Value.Replace("_", SyntaxFacts.FULLWIDTH_LOW_LINE), 2815]]>.Value.Replace("_", SyntaxFacts.FULLWIDTH_LOW_LINE), 2838]]>.Value.Replace("_", SyntaxFacts.FULLWIDTH_LOW_LINE), 2859]]>.Value.Replace("_", SyntaxFacts.FULLWIDTH_LOW_LINE), 2882]]>.Value.Replace("_", SyntaxFacts.FULLWIDTH_LOW_LINE),
Parser\ParseIteratorTests.vb (2)
260Assert.Equal(1, lambdas.Count(Function(l) SyntaxFacts.IsSingleLineLambdaExpression(l.Kind))) 261Assert.Equal(2, lambdas.Count(Function(l) SyntaxFacts.IsMultiLineLambdaExpression(l.Kind)))
Parser\ParseStatements.vb (1)
10Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Parser\ParseXml.vb (2)
7Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 3952SyntaxFacts.IsWhitespace(c) Then
Scanner\ScannerTests.vb (31)
2117Assert.False(SyntaxFacts.IsWhitespace("A"c)) 2118Assert.True(SyntaxFacts.IsWhitespace(" "c)) 2119Assert.True(SyntaxFacts.IsWhitespace(ChrW(9))) 2120Assert.False(SyntaxFacts.IsWhitespace(ChrW(0))) 2121Assert.False(SyntaxFacts.IsWhitespace(ChrW(128))) 2122Assert.False(SyntaxFacts.IsWhitespace(ChrW(129))) 2123Assert.False(SyntaxFacts.IsWhitespace(ChrW(127))) 2124Assert.True(SyntaxFacts.IsWhitespace(ChrW(160))) 2125Assert.True(SyntaxFacts.IsWhitespace(ChrW(12288))) 2126Assert.True(SyntaxFacts.IsWhitespace(ChrW(8192))) 2127Assert.True(SyntaxFacts.IsWhitespace(ChrW(8203))) 2132Assert.True(SyntaxFacts.IsNewLine(ChrW(13))) 2133Assert.True(SyntaxFacts.IsNewLine(ChrW(10))) 2134Assert.True(SyntaxFacts.IsNewLine(ChrW(133))) 2135Assert.True(SyntaxFacts.IsNewLine(ChrW(8232))) 2136Assert.True(SyntaxFacts.IsNewLine(ChrW(8233))) 2137Assert.False(SyntaxFacts.IsNewLine(ChrW(132))) 2138Assert.False(SyntaxFacts.IsNewLine(ChrW(160))) 2139Assert.False(SyntaxFacts.IsNewLine(" "c)) 2140Assert.Equal(String.Empty, SyntaxFacts.MakeHalfWidthIdentifier(String.Empty)) 2141Assert.Null(SyntaxFacts.MakeHalfWidthIdentifier(Nothing)) 2142Assert.Equal("ABC", SyntaxFacts.MakeHalfWidthIdentifier("ABC")) 2143Assert.Equal(ChrW(65280), SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65280))) 2144Assert.NotEqual(ChrW(65281), SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65281))) 2145Assert.Equal(1, SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65281)).Length) 2150Assert.Equal(String.Empty, SyntaxFacts.MakeHalfWidthIdentifier(String.Empty)) 2151Assert.Equal(Nothing, SyntaxFacts.MakeHalfWidthIdentifier(Nothing)) 2152Assert.Equal("ABC", SyntaxFacts.MakeHalfWidthIdentifier("ABC")) 2153Assert.Equal(ChrW(65280), SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65280))) 2154Assert.NotEqual(ChrW(65281), SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65281))) 2155Assert.Equal(1, SyntaxFacts.MakeHalfWidthIdentifier(ChrW(65281)).Length)
Syntax\SyntaxFactsTest.vb (366)
38Assert.False(SyntaxFacts.IsXmlTextToken(Nothing)) 43Assert.True(SyntaxFacts.IsXmlTextToken(SyntaxKind.XmlTextLiteralToken)) 48Assert.False(SyntaxFacts.IsXmlTextToken(SyntaxKind.AtToken)) 53Assert.Equal(SyntaxKind.ClassKeyword, SyntaxFacts.GetKeywordKind("Class")) 54Assert.Equal(SyntaxKind.None, SyntaxFacts.GetKeywordKind("Where")) 59Assert.Equal(SyntaxKind.GetAccessorStatement, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.GetKeyword)) 60Assert.Equal(SyntaxKind.SetAccessorStatement, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.SetKeyword)) 61Assert.Equal(SyntaxKind.RemoveHandlerStatement, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.RemoveHandlerKeyword)) 62Assert.Equal(SyntaxKind.AddHandlerStatement, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.AddHandlerKeyword)) 63Assert.Equal(SyntaxKind.RaiseEventAccessorStatement, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.RaiseEventKeyword)) 64Assert.Equal(SyntaxKind.None, SyntaxFacts.GetAccessorStatementKind(SyntaxKind.AddressOfKeyword)) 69Assert.Equal(SyntaxKind.EnumStatement, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.EnumKeyword)) 70Assert.Equal(SyntaxKind.ClassStatement, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.ClassKeyword)) 71Assert.Equal(SyntaxKind.StructureStatement, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.StructureKeyword)) 72Assert.Equal(SyntaxKind.InterfaceStatement, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.InterfaceKeyword)) 73Assert.Equal(SyntaxKind.None, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.ForKeyword)) 79Assert.NotEqual(SyntaxKind.None, SyntaxFacts.GetBinaryExpression(item)) 81Assert.Equal(SyntaxKind.SubtractExpression, SyntaxFacts.GetBinaryExpression(SyntaxKind.MinusToken)) 82Assert.Equal(SyntaxKind.AndAlsoExpression, SyntaxFacts.GetBinaryExpression(SyntaxKind.AndAlsoKeyword)) 83Assert.Equal(SyntaxKind.None, SyntaxFacts.GetBinaryExpression(SyntaxKind.ForKeyword)) 84Assert.Equal(SyntaxKind.None, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.ForKeyword)) 89Assert.Equal("Case", SyntaxFacts.GetBlockName(SyntaxKind.CaseBlock)) 90Assert.Equal("Do Loop", SyntaxFacts.GetBlockName(SyntaxKind.SimpleDoLoopBlock)) 91Assert.Equal("Do Loop", SyntaxFacts.GetBlockName(SyntaxKind.DoWhileLoopBlock)) 92Assert.Equal("Do Loop", SyntaxFacts.GetBlockName(SyntaxKind.DoUntilLoopBlock)) 93Assert.Equal("Do Loop", SyntaxFacts.GetBlockName(SyntaxKind.DoLoopWhileBlock)) 94Assert.Equal("Do Loop", SyntaxFacts.GetBlockName(SyntaxKind.DoLoopUntilBlock)) 95Assert.Equal("While", SyntaxFacts.GetBlockName(SyntaxKind.WhileBlock)) 96Assert.Equal("With", SyntaxFacts.GetBlockName(SyntaxKind.WithBlock)) 97Assert.Equal("SyncLock", SyntaxFacts.GetBlockName(SyntaxKind.SyncLockBlock)) 98Assert.Equal("Using", SyntaxFacts.GetBlockName(SyntaxKind.UsingBlock)) 99Assert.Equal("For", SyntaxFacts.GetBlockName(SyntaxKind.ForBlock)) 100Assert.Equal("For Each", SyntaxFacts.GetBlockName(SyntaxKind.ForEachBlock)) 101Assert.Equal("Select", SyntaxFacts.GetBlockName(SyntaxKind.SelectBlock)) 102Assert.Equal("If", SyntaxFacts.GetBlockName(SyntaxKind.MultiLineIfBlock)) 103Assert.Equal("Else If", SyntaxFacts.GetBlockName(SyntaxKind.ElseIfBlock)) 104Assert.Equal("Else", SyntaxFacts.GetBlockName(SyntaxKind.ElseBlock)) 105Assert.Equal("Try", SyntaxFacts.GetBlockName(SyntaxKind.TryBlock)) 106Assert.Equal("Catch", SyntaxFacts.GetBlockName(SyntaxKind.CatchBlock)) 107Assert.Equal("Finally", SyntaxFacts.GetBlockName(SyntaxKind.FinallyBlock)) 112Assert.Equal(SyntaxKind.MidKeyword, SyntaxFacts.GetContextualKeywordKind("mid")) 113Assert.Equal(SyntaxKind.FromKeyword, SyntaxFacts.GetContextualKeywordKind("from")) 114Assert.Equal(SyntaxKind.None, SyntaxFacts.GetContextualKeywordKind(String.Empty)) 115Assert.Equal(SyntaxKind.None, SyntaxFacts.GetBaseTypeStatementKind(SyntaxKind.ForKeyword)) 119Assert.NotEqual(SyntaxKind.None, SyntaxFacts.GetContextualKeywordKind(item)) 122Dim actualCount = SyntaxFacts.GetContextualKeywordKinds.Count 129Assert.NotEqual(0, SyntaxFacts.GetContextualKeywordKinds.Count) 130Assert.Contains(SyntaxKind.FromKeyword, SyntaxFacts.GetContextualKeywordKinds) 131Assert.DoesNotContain(SyntaxKind.DimKeyword, SyntaxFacts.GetContextualKeywordKinds) 132Assert.DoesNotContain(SyntaxKind.StaticKeyword, SyntaxFacts.GetContextualKeywordKinds) 137Assert.Equal(SyntaxKind.None, SyntaxFacts.GetInstanceExpression(SyntaxKind.DeclareKeyword)) 138Assert.Equal(SyntaxKind.MeExpression, SyntaxFacts.GetInstanceExpression(SyntaxKind.MeKeyword)) 139Assert.Equal(SyntaxKind.MyBaseExpression, SyntaxFacts.GetInstanceExpression(SyntaxKind.MyBaseKeyword)) 140Assert.Equal(SyntaxKind.MyClassExpression, SyntaxFacts.GetInstanceExpression(SyntaxKind.MyClassKeyword)) 145Assert.NotEqual(0, SyntaxFacts.GetKeywordKinds.Count) 146Assert.Contains(SyntaxKind.CIntKeyword, SyntaxFacts.GetKeywordKinds) 153Assert.NotEqual(SyntaxKind.None, SyntaxFacts.GetPreprocessorKeywordKind(item)) 155Assert.Equal(SyntaxKind.ExternalSourceKeyword, SyntaxFacts.GetPreprocessorKeywordKind("externalsource")) 156Assert.Equal(SyntaxKind.EndKeyword, SyntaxFacts.GetPreprocessorKeywordKind("end")) 157Assert.Equal(SyntaxKind.DisableKeyword, SyntaxFacts.GetPreprocessorKeywordKind("disable")) 158Assert.Equal(SyntaxKind.EnableKeyword, SyntaxFacts.GetPreprocessorKeywordKind("enable")) 159Assert.Equal(SyntaxKind.None, SyntaxFacts.GetPreprocessorKeywordKind(String.Empty)) 160Assert.Equal(SyntaxKind.None, SyntaxFacts.GetPreprocessorKeywordKind("d")) 165Assert.Contains(SyntaxKind.RegionKeyword, SyntaxFacts.GetPreprocessorKeywordKinds) 166Assert.Contains(SyntaxKind.EnableKeyword, SyntaxFacts.GetPreprocessorKeywordKinds) 167Assert.Contains(SyntaxKind.WarningKeyword, SyntaxFacts.GetPreprocessorKeywordKinds) 168Assert.Contains(SyntaxKind.DisableKeyword, SyntaxFacts.GetPreprocessorKeywordKinds) 169Assert.DoesNotContain(SyntaxKind.PublicKeyword, SyntaxFacts.GetPreprocessorKeywordKinds) 174Assert.NotEqual(0, SyntaxFacts.GetPunctuationKinds.Count) 175Assert.Contains(SyntaxKind.ExclamationToken, SyntaxFacts.GetPunctuationKinds) 176Assert.Contains(SyntaxKind.EmptyToken, SyntaxFacts.GetPunctuationKinds) 177Assert.DoesNotContain(SyntaxKind.NumericLabel, SyntaxFacts.GetPunctuationKinds) 182Assert.NotEqual(0, SyntaxFacts.GetReservedKeywordKinds.Count) 183Assert.Contains(SyntaxKind.AddressOfKeyword, SyntaxFacts.GetReservedKeywordKinds) 184Assert.DoesNotContain(SyntaxKind.QualifiedName, SyntaxFacts.GetReservedKeywordKinds) 190Assert.True(SyntaxFacts.IsAccessorStatement(item)) 192Assert.False(SyntaxFacts.IsAccessorStatement(SyntaxKind.SubKeyword)) 193Assert.False(SyntaxFacts.IsAccessorStatement(SyntaxKind.None)) 199Assert.True(SyntaxFacts.IsAccessorStatementAccessorKeyword(item)) 201Assert.False(SyntaxFacts.IsAccessorStatementAccessorKeyword(SyntaxKind.SubKeyword)) 202Assert.False(SyntaxFacts.IsAccessorStatementAccessorKeyword(SyntaxKind.None)) 208Assert.True(SyntaxFacts.IsAddRemoveHandlerStatement(item)) 210Assert.False(SyntaxFacts.IsAddRemoveHandlerStatement(SyntaxKind.ExitKeyword)) 211Assert.False(SyntaxFacts.IsAddRemoveHandlerStatement(SyntaxKind.None)) 217Assert.True(SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(item)) 219Assert.False(SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(SyntaxKind.ExitKeyword)) 220Assert.False(SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(SyntaxKind.None)) 258Assert.False(SyntaxFacts.IsAddressOfOperand(DirectCast(symNode, ExpressionSyntax))) 259Assert.False(SyntaxFacts.IsInvocationOrAddressOfOperand(DirectCast(symNode, ExpressionSyntax))) 260Assert.True(SyntaxFacts.IsAddressOfOperand(CType(symNode.ChildNodes(0), ExpressionSyntax))) 261Assert.True(SyntaxFacts.IsInvocationOrAddressOfOperand(CType(symNode.ChildNodes(0), ExpressionSyntax))) 262Assert.False(SyntaxFacts.IsInvoked(DirectCast(FindNodeOrTokenByKind(tree, SyntaxKind.InvocationExpression, 1).AsNode, ExpressionSyntax))) 265Assert.False(SyntaxFacts.IsInvoked(CType(symNode, ExpressionSyntax))) 266Assert.True(SyntaxFacts.IsInvoked(CType(symNode.ChildNodes(0), ExpressionSyntax))) 268Assert.False(SyntaxFacts.IsAttributeName(symNode)) 269Assert.True(SyntaxFacts.IsAttributeName(symNode.ChildNodes(0))) 276Assert.True(SyntaxFacts.IsAssignmentStatement(item)) 278Assert.False(SyntaxFacts.IsAssignmentStatement(SyntaxKind.ExitKeyword)) 279Assert.False(SyntaxFacts.IsAssignmentStatement(SyntaxKind.None)) 285Assert.True(SyntaxFacts.IsAssignmentStatementOperatorToken(item)) 287Assert.False(SyntaxFacts.IsAssignmentStatementOperatorToken(SyntaxKind.ExitKeyword)) 288Assert.False(SyntaxFacts.IsAssignmentStatementOperatorToken(SyntaxKind.None)) 294Assert.True(SyntaxFacts.IsAttributeTargetAttributeModifier(item)) 296Assert.False(SyntaxFacts.IsAttributeTargetAttributeModifier(SyntaxKind.SubKeyword)) 297Assert.False(SyntaxFacts.IsAttributeTargetAttributeModifier(SyntaxKind.None)) 303Assert.True(SyntaxFacts.IsBinaryExpression(item)) 305Assert.False(SyntaxFacts.IsBinaryExpression(SyntaxKind.MinusToken)) 306Assert.False(SyntaxFacts.IsBinaryExpression(SyntaxKind.None)) 312Assert.True(SyntaxFacts.IsBinaryExpressionOperatorToken(item)) 314Assert.False(SyntaxFacts.IsBinaryExpressionOperatorToken(SyntaxKind.MinusEqualsToken)) 315Assert.False(SyntaxFacts.IsBinaryExpressionOperatorToken(SyntaxKind.None)) 321Assert.True(SyntaxFacts.IsCaseBlock(item)) 323Assert.False(SyntaxFacts.IsCaseBlock(SyntaxKind.ExitKeyword)) 324Assert.False(SyntaxFacts.IsCaseBlock(SyntaxKind.None)) 330Assert.True(SyntaxFacts.IsRelationalCaseClause(item)) 332Assert.False(SyntaxFacts.IsRelationalCaseClause(SyntaxKind.ExitKeyword)) 333Assert.False(SyntaxFacts.IsRelationalCaseClause(SyntaxKind.None)) 339Assert.True(SyntaxFacts.IsRelationalCaseClauseOperatorToken(item)) 341Assert.False(SyntaxFacts.IsRelationalCaseClauseOperatorToken(SyntaxKind.ExitKeyword)) 342Assert.False(SyntaxFacts.IsRelationalCaseClauseOperatorToken(SyntaxKind.None)) 348Assert.True(SyntaxFacts.IsCaseStatement(item)) 350Assert.False(SyntaxFacts.IsCaseStatement(SyntaxKind.ExitKeyword)) 351Assert.False(SyntaxFacts.IsCaseStatement(SyntaxKind.None)) 356Assert.False(SyntaxFacts.IsContextualKeyword(SyntaxKind.GosubKeyword)) 357Assert.True(SyntaxFacts.IsContextualKeyword(SyntaxKind.AggregateKeyword)) 362Assert.False(SyntaxFacts.IsReservedKeyword(SyntaxKind.OrderByClause)) 363Assert.True(SyntaxFacts.IsReservedKeyword(SyntaxKind.AddHandlerKeyword)) 369Assert.True(SyntaxFacts.IsContinueStatement(item)) 371Assert.False(SyntaxFacts.IsContinueStatement(SyntaxKind.WithKeyword)) 372Assert.False(SyntaxFacts.IsContinueStatement(SyntaxKind.None)) 378Assert.True(SyntaxFacts.IsContinueStatementBlockKeyword(item)) 380Assert.False(SyntaxFacts.IsContinueStatementBlockKeyword(SyntaxKind.ExitKeyword)) 381Assert.False(SyntaxFacts.IsContinueStatementBlockKeyword(SyntaxKind.None)) 387Assert.True(SyntaxFacts.IsDeclareStatement(item)) 389Assert.False(SyntaxFacts.IsDeclareStatement(SyntaxKind.NamespaceBlock)) 390Assert.False(SyntaxFacts.IsDeclareStatement(SyntaxKind.None)) 396Assert.True(SyntaxFacts.IsDeclareStatementCharsetKeyword(item)) 398Assert.False(SyntaxFacts.IsDeclareStatementCharsetKeyword(SyntaxKind.FunctionKeyword)) 399Assert.False(SyntaxFacts.IsDeclareStatementCharsetKeyword(SyntaxKind.None)) 405Assert.True(SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(item)) 407Assert.False(SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(SyntaxKind.NamespaceBlock)) 408Assert.False(SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(SyntaxKind.None)) 414Assert.True(SyntaxFacts.IsDelegateStatement(item)) 416Assert.False(SyntaxFacts.IsDelegateStatement(SyntaxKind.NamespaceBlock)) 417Assert.False(SyntaxFacts.IsDelegateStatement(SyntaxKind.None)) 423Assert.True(SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(item)) 425Assert.False(SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(SyntaxKind.NamespaceBlock)) 426Assert.False(SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(SyntaxKind.None)) 434Assert.True(SyntaxFacts.IsDoLoopBlock(item)) 436Assert.False(SyntaxFacts.IsDoLoopBlock(SyntaxKind.ExitKeyword)) 437Assert.False(SyntaxFacts.IsDoLoopBlock(SyntaxKind.None)) 443Assert.True(SyntaxFacts.IsEndBlockStatement(item)) 445Assert.False(SyntaxFacts.IsEndBlockStatement(SyntaxKind.AddHandlerStatement)) 451Assert.True(SyntaxFacts.IsEndBlockStatementBlockKeyword(item)) 453Assert.False(SyntaxFacts.IsEndBlockStatementBlockKeyword(SyntaxKind.AddHandlerStatement)) 454Assert.False(SyntaxFacts.IsEndBlockStatementBlockKeyword(SyntaxKind.None)) 460Assert.True(SyntaxFacts.IsExitStatement(item)) 462Assert.False(SyntaxFacts.IsExitStatement(SyntaxKind.WithKeyword)) 463Assert.False(SyntaxFacts.IsExitStatement(SyntaxKind.None)) 469Assert.True(SyntaxFacts.IsExitStatementBlockKeyword(item)) 471Assert.False(SyntaxFacts.IsExitStatementBlockKeyword(SyntaxKind.ExitKeyword)) 472Assert.False(SyntaxFacts.IsExitStatementBlockKeyword(SyntaxKind.None)) 478Assert.True(SyntaxFacts.IsIfDirectiveTrivia(item)) 480Assert.False(SyntaxFacts.IsIfDirectiveTrivia(SyntaxKind.ExitKeyword)) 481Assert.False(SyntaxFacts.IsIfDirectiveTrivia(SyntaxKind.None)) 487Assert.True(SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(item)) 489Assert.False(SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(SyntaxKind.ExitKeyword)) 490Assert.False(SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(SyntaxKind.None)) 495Assert.True(SyntaxFacts.IsInstanceExpression(SyntaxKind.MeKeyword)) 496Assert.True(SyntaxFacts.IsInstanceExpression(SyntaxKind.MyBaseKeyword)) 497Assert.False(SyntaxFacts.IsInstanceExpression(SyntaxKind.REMKeyword)) 503Assert.True(SyntaxFacts.IsKeywordEventContainerKeyword(item)) 505Assert.False(SyntaxFacts.IsKeywordEventContainerKeyword(SyntaxKind.SubKeyword)) 506Assert.False(SyntaxFacts.IsKeywordEventContainerKeyword(SyntaxKind.None)) 512Assert.True(SyntaxFacts.IsKeywordKind(item)) 514Assert.False(SyntaxFacts.IsKeywordKind(SyntaxKind.MinusEqualsToken)) 515Assert.False(SyntaxFacts.IsKeywordKind(SyntaxKind.None)) 521Assert.True(SyntaxFacts.IsLabelStatementLabelToken(item)) 523Assert.False(SyntaxFacts.IsLabelStatementLabelToken(SyntaxKind.WithKeyword)) 524Assert.False(SyntaxFacts.IsLabelStatementLabelToken(SyntaxKind.None)) 530Assert.True(SyntaxFacts.IsLambdaHeader(item)) 532Assert.False(SyntaxFacts.IsLambdaHeader(SyntaxKind.ExitKeyword)) 533Assert.False(SyntaxFacts.IsLambdaHeader(SyntaxKind.None)) 539Assert.True(SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(item)) 541Assert.False(SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(SyntaxKind.ExitKeyword)) 542Assert.False(SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(SyntaxKind.None)) 547Assert.True(SyntaxFacts.IsLanguagePunctuation(SyntaxKind.ExclamationToken)) 548Assert.False(SyntaxFacts.IsLanguagePunctuation(SyntaxKind.ConstKeyword)) 549Assert.False(SyntaxFacts.IsLanguagePunctuation(SyntaxKind.FromKeyword)) 555Assert.True(SyntaxFacts.IsLiteralExpression(item)) 557Assert.False(SyntaxFacts.IsLiteralExpression(SyntaxKind.ExitKeyword)) 558Assert.False(SyntaxFacts.IsLiteralExpression(SyntaxKind.None)) 564Assert.True(SyntaxFacts.IsMemberAccessExpression(item)) 566Assert.False(SyntaxFacts.IsMemberAccessExpression(SyntaxKind.ExitKeyword)) 567Assert.False(SyntaxFacts.IsMemberAccessExpression(SyntaxKind.None)) 573Assert.True(SyntaxFacts.IsMemberAccessExpressionOperatorToken(item)) 575Assert.False(SyntaxFacts.IsMemberAccessExpressionOperatorToken(SyntaxKind.ExitKeyword)) 576Assert.False(SyntaxFacts.IsMemberAccessExpressionOperatorToken(SyntaxKind.None)) 582Assert.True(SyntaxFacts.IsMethodBlock(item)) 586Assert.False(SyntaxFacts.IsMethodBlock(item)) 590Assert.True(SyntaxFacts.IsAccessorBlock(item)) 594Assert.False(SyntaxFacts.IsAccessorBlock(item)) 597Assert.False(SyntaxFacts.IsMethodBlock(SyntaxKind.MultiLineIfBlock)) 598Assert.False(SyntaxFacts.IsMethodBlock(SyntaxKind.None)) 604Assert.True(SyntaxFacts.IsMethodStatement(item)) 606Assert.False(SyntaxFacts.IsMethodStatement(SyntaxKind.NamespaceBlock)) 607Assert.False(SyntaxFacts.IsMethodStatement(SyntaxKind.None)) 613Assert.True(SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(item)) 615Assert.False(SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(SyntaxKind.NamespaceBlock)) 616Assert.False(SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(SyntaxKind.None)) 622Assert.False(SyntaxFacts.IsMultiLineLambdaExpression(item)) 625Assert.True(SyntaxFacts.IsMultiLineLambdaExpression(item)) 628Assert.False(SyntaxFacts.IsMultiLineLambdaExpression(SyntaxKind.None)) 633Assert.True(SyntaxFacts.IsName(SyntaxKind.IdentifierName)) 634Assert.True(SyntaxFacts.IsName(SyntaxKind.GenericName)) 635Assert.True(SyntaxFacts.IsName(SyntaxKind.QualifiedName)) 636Assert.True(SyntaxFacts.IsName(SyntaxKind.GlobalName)) 637Assert.False(SyntaxFacts.IsName(SyntaxKind.GlobalKeyword)) 638Assert.False(SyntaxFacts.IsName(SyntaxKind.CommaToken)) 639Assert.False(SyntaxFacts.IsName(SyntaxKind.FunctionKeyword)) 644Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.ClassStatement)) 645Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.InterfaceStatement)) 646Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.StructureStatement)) 647Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.EnumStatement)) 648Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.ModuleStatement)) 649Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.NamespaceStatement)) 650Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.DelegateFunctionStatement)) 651Assert.True(SyntaxFacts.IsNamespaceMemberDeclaration(SyntaxKind.DelegateSubStatement)) 652Assert.False(SyntaxFacts.IsName(SyntaxKind.FunctionStatement)) 653Assert.False(SyntaxFacts.IsName(SyntaxKind.SubStatement)) 659Assert.True(SyntaxFacts.IsOnErrorGoToStatement(item)) 661Assert.False(SyntaxFacts.IsOnErrorGoToStatement(SyntaxKind.ExitKeyword)) 662Assert.False(SyntaxFacts.IsOnErrorGoToStatement(SyntaxKind.None)) 667Assert.True(SyntaxFacts.IsOperator(SyntaxKind.AndKeyword)) 668Assert.False(SyntaxFacts.IsOperator(SyntaxKind.ForKeyword)) 674Assert.True(SyntaxFacts.IsOperatorStatementOperatorToken(item)) 676Assert.False(SyntaxFacts.IsOperatorStatementOperatorToken(SyntaxKind.SubKeyword)) 677Assert.False(SyntaxFacts.IsOperatorStatementOperatorToken(SyntaxKind.None)) 683Assert.True(SyntaxFacts.IsOptionStatementNameKeyword(item)) 685Assert.False(SyntaxFacts.IsOptionStatementNameKeyword(SyntaxKind.AddHandlerStatement)) 686Assert.False(SyntaxFacts.IsOptionStatementNameKeyword(SyntaxKind.None)) 692Assert.True(SyntaxFacts.IsOrdering(item)) 694Assert.False(SyntaxFacts.IsOrdering(SyntaxKind.ExitKeyword)) 695Assert.False(SyntaxFacts.IsOrdering(SyntaxKind.None)) 701Assert.True(SyntaxFacts.IsOrderingAscendingOrDescendingKeyword(item)) 703Assert.False(SyntaxFacts.IsOrderingAscendingOrDescendingKeyword(SyntaxKind.ExitKeyword)) 704Assert.False(SyntaxFacts.IsOrderingAscendingOrDescendingKeyword(SyntaxKind.None)) 710Assert.True(SyntaxFacts.IsPartitionClause(item)) 712Assert.False(SyntaxFacts.IsPartitionClause(SyntaxKind.ExitKeyword)) 713Assert.False(SyntaxFacts.IsPartitionClause(SyntaxKind.None)) 719Assert.True(SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(item)) 721Assert.False(SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(SyntaxKind.ExitKeyword)) 722Assert.False(SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(SyntaxKind.None)) 728Assert.True(SyntaxFacts.IsPartitionWhileClause(item)) 730Assert.False(SyntaxFacts.IsPartitionWhileClause(SyntaxKind.ExitKeyword)) 731Assert.False(SyntaxFacts.IsPartitionWhileClause(SyntaxKind.None)) 737Assert.True(SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(item)) 739Assert.False(SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(SyntaxKind.ExitKeyword)) 740Assert.False(SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(SyntaxKind.None)) 746Assert.True(SyntaxFacts.IsPredefinedCastExpressionKeyword(item)) 748Assert.False(SyntaxFacts.IsPredefinedCastExpressionKeyword(SyntaxKind.MinusToken)) 749Assert.False(SyntaxFacts.IsPredefinedCastExpressionKeyword(SyntaxKind.None)) 754Assert.True(SyntaxFacts.IsPredefinedType(SyntaxKind.IntegerKeyword)) 755Assert.True(SyntaxFacts.IsPredefinedType(SyntaxKind.ObjectKeyword)) 756Assert.False(SyntaxFacts.IsPredefinedType(SyntaxKind.NothingKeyword)) 761Assert.True(SyntaxFacts.IsPreprocessorDirective(SyntaxKind.IfDirectiveTrivia)) 762Assert.False(SyntaxFacts.IsPreprocessorDirective(SyntaxKind.IfKeyword)) 767Assert.True(SyntaxFacts.IsPreprocessorKeyword(SyntaxKind.ExternalSourceKeyword)) 768Assert.True(SyntaxFacts.IsPreprocessorKeyword(SyntaxKind.EnableKeyword)) 769Assert.True(SyntaxFacts.IsPreprocessorKeyword(SyntaxKind.DisableKeyword)) 770Assert.True(SyntaxFacts.IsPreprocessorKeyword(SyntaxKind.IfKeyword)) 771Assert.False(SyntaxFacts.IsPreprocessorKeyword(SyntaxKind.FromKeyword)) 776Assert.True(SyntaxFacts.IsPreprocessorPunctuation(SyntaxKind.HashToken)) 777Assert.False(SyntaxFacts.IsPreprocessorPunctuation(SyntaxKind.DotToken)) 778Assert.False(SyntaxFacts.IsPreprocessorPunctuation(SyntaxKind.AmpersandToken)) 784Assert.True(SyntaxFacts.IsPunctuation(item)) 786Assert.False(SyntaxFacts.IsPunctuation(SyntaxKind.ExitKeyword)) 787Assert.False(SyntaxFacts.IsPunctuation(SyntaxKind.None)) 792Assert.True(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.AddHandlerKeyword)) 793Assert.True(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.EndOfXmlToken)) 794Assert.True(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.DollarSignDoubleQuoteToken)) 795Assert.True(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.EndOfInterpolatedStringToken)) 796Assert.False(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.XmlNameToken)) 797Assert.False(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.ImportAliasClause)) 798Assert.False(SyntaxFacts.IsPunctuationOrKeyword(SyntaxKind.ForStatement)) 804Assert.True(SyntaxFacts.IsReDimStatement(item)) 806Assert.False(SyntaxFacts.IsReDimStatement(SyntaxKind.SimpleAssignmentStatement)) 807Assert.False(SyntaxFacts.IsReDimStatement(SyntaxKind.None)) 812Assert.True(SyntaxFacts.IsRelationalOperator(SyntaxKind.LessThanToken)) 813Assert.False(SyntaxFacts.IsRelationalOperator(SyntaxKind.DotToken)) 820Assert.True(SyntaxFacts.IsReservedKeyword(SyntaxKind.AddHandlerKeyword)) 826Assert.True(SyntaxFacts.IsResumeStatement(item)) 828Assert.False(SyntaxFacts.IsResumeStatement(SyntaxKind.ExitKeyword)) 829Assert.False(SyntaxFacts.IsResumeStatement(SyntaxKind.None)) 835Assert.True(SyntaxFacts.IsSingleLineLambdaExpression(item)) 837Assert.False(SyntaxFacts.IsSingleLineLambdaExpression(SyntaxKind.MinusToken)) 838Assert.False(SyntaxFacts.IsSingleLineLambdaExpression(SyntaxKind.None)) 844Assert.True(SyntaxFacts.IsSpecialConstraint(item)) 846Assert.False(SyntaxFacts.IsSpecialConstraint(SyntaxKind.ConstDirectiveTrivia)) 847Assert.False(SyntaxFacts.IsSpecialConstraint(SyntaxKind.None)) 853Assert.True(SyntaxFacts.IsSpecialConstraintConstraintKeyword(item)) 855Assert.False(SyntaxFacts.IsSpecialConstraintConstraintKeyword(SyntaxKind.ModuleKeyword)) 856Assert.False(SyntaxFacts.IsSpecialConstraintConstraintKeyword(SyntaxKind.None)) 862Assert.True(SyntaxFacts.IsStopOrEndStatement(item)) 864Assert.False(SyntaxFacts.IsStopOrEndStatement(SyntaxKind.WithKeyword)) 865Assert.False(SyntaxFacts.IsStopOrEndStatement(SyntaxKind.None)) 871Assert.True(SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(item)) 873Assert.False(SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(SyntaxKind.WithKeyword)) 874Assert.False(SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(SyntaxKind.None)) 879Assert.True(SyntaxFacts.IsAnyToken(SyntaxKind.AddHandlerKeyword)) 880Assert.True(SyntaxFacts.IsAnyToken(SyntaxKind.CharacterLiteralToken)) 881Assert.False(SyntaxFacts.IsAnyToken(SyntaxKind.GlobalName)) 882Assert.False(SyntaxFacts.IsAnyToken(SyntaxKind.DocumentationCommentTrivia)) 887Assert.True(SyntaxFacts.IsTrivia(SyntaxKind.WhitespaceTrivia)) 888Assert.False(SyntaxFacts.IsTrivia(SyntaxKind.REMKeyword)) 894Assert.True(SyntaxFacts.IsTypeOfExpression(item)) 896Assert.False(SyntaxFacts.IsTypeOfExpression(SyntaxKind.ExitKeyword)) 897Assert.False(SyntaxFacts.IsTypeOfExpression(SyntaxKind.None)) 903Assert.True(SyntaxFacts.IsTypeOfExpressionOperatorToken(item)) 905Assert.False(SyntaxFacts.IsTypeOfExpressionOperatorToken(SyntaxKind.ExitKeyword)) 906Assert.False(SyntaxFacts.IsTypeOfExpressionOperatorToken(SyntaxKind.None)) 912Assert.True(SyntaxFacts.IsTypeParameterVarianceKeyword(item)) 914Assert.False(SyntaxFacts.IsTypeParameterVarianceKeyword(SyntaxKind.GetKeyword)) 915Assert.False(SyntaxFacts.IsTypeParameterVarianceKeyword(SyntaxKind.None)) 921Assert.True(SyntaxFacts.IsUnaryExpression(item)) 923Assert.False(SyntaxFacts.IsUnaryExpression(SyntaxKind.MinusToken)) 924Assert.False(SyntaxFacts.IsUnaryExpression(SyntaxKind.None)) 930Assert.True(SyntaxFacts.IsUnaryExpressionOperatorToken(item)) 933Assert.False(SyntaxFacts.IsUnaryExpressionOperatorToken(SyntaxKind.MinusEqualsToken)) 934Assert.False(SyntaxFacts.IsUnaryExpressionOperatorToken(SyntaxKind.None)) 940Assert.True(SyntaxFacts.IsWhileOrUntilClause(item)) 942Assert.False(SyntaxFacts.IsWhileOrUntilClause(SyntaxKind.ExitKeyword)) 943Assert.False(SyntaxFacts.IsWhileOrUntilClause(SyntaxKind.None)) 949Assert.True(SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(item)) 951Assert.False(SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(SyntaxKind.ExitKeyword)) 952Assert.False(SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(SyntaxKind.None)) 958Assert.True(SyntaxFacts.IsXmlMemberAccessExpression(item)) 960Assert.False(SyntaxFacts.IsXmlMemberAccessExpression(SyntaxKind.ExitKeyword)) 961Assert.False(SyntaxFacts.IsXmlMemberAccessExpression(SyntaxKind.None)) 967Assert.True(SyntaxFacts.IsXmlMemberAccessExpressionToken2(item)) 969Assert.False(SyntaxFacts.IsXmlMemberAccessExpressionToken2(SyntaxKind.MinusToken)) 970Assert.False(SyntaxFacts.IsXmlMemberAccessExpressionToken2(SyntaxKind.None)) 976Assert.True(SyntaxFacts.IsXmlStringEndQuoteToken(item)) 978Assert.False(SyntaxFacts.IsXmlStringEndQuoteToken(SyntaxKind.ExitKeyword)) 979Assert.False(SyntaxFacts.IsXmlStringEndQuoteToken(SyntaxKind.None)) 985Assert.True(SyntaxFacts.IsXmlStringStartQuoteToken(item)) 987Assert.False(SyntaxFacts.IsXmlStringStartQuoteToken(SyntaxKind.ExitKeyword)) 988Assert.False(SyntaxFacts.IsXmlStringStartQuoteToken(SyntaxKind.None)) 994Assert.True(SyntaxFacts.IsXmlTextToken(item)) 996Assert.False(SyntaxFacts.IsXmlTextToken(SyntaxKind.ExitKeyword)) 997Assert.False(SyntaxFacts.IsXmlTextToken(SyntaxKind.None)) 1003Assert.Equal(VarianceKind.In, SyntaxFacts.VarianceKindFromToken(keywordToken)) 1005Assert.Equal(VarianceKind.Out, SyntaxFacts.VarianceKindFromToken(keywordToken)) 1007Assert.Equal(VarianceKind.None, SyntaxFacts.VarianceKindFromToken(keywordToken)) 1059If SyntaxFacts.AllowsTrailingImplicitLineContinuation(currentToken) OrElse 1060SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken) Then 1085If SyntaxFacts.AllowsTrailingImplicitLineContinuation(currentToken) OrElse 1086SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken) Then 1151If Not (SyntaxFacts.AllowsTrailingImplicitLineContinuation(currentToken) OrElse 1152SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken)) Then 1191Assert.False(SyntaxFacts.AllowsTrailingImplicitLineContinuation(prevToken)) 1192Assert.False(SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken)) 1215Assert.False(SyntaxFacts.AllowsLeadingImplicitLineContinuation(memberAccess.Name.Identifier)) 1216Assert.False(SyntaxFacts.AllowsTrailingImplicitLineContinuation(memberAccess.OperatorToken)) 1223Dim text = SyntaxFacts.GetText(SyntaxKind.BeginCDataToken) 1262Assert.Equal(isReserved, SyntaxFacts.IsReservedTupleElementName(elementName))
Syntax\SyntaxTokenFactoryTests.vb (19)
20Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword)) 25Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 43keywordToken = SyntaxFactory.Token(New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxKind.AddHandlerKeyword, SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 44Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 48keywordToken = SyntaxFactory.Token(SyntaxKind.AddHandlerKeyword, New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 49Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 53keywordToken = SyntaxFactory.Token(New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxKind.AddHandlerKeyword, New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 54Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 64Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken)) 69Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 87punctuationToken = SyntaxFactory.Token(New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxKind.ExclamationToken, SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 88Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 92punctuationToken = SyntaxFactory.Token(SyntaxKind.ExclamationToken, New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 93Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 97punctuationToken = SyntaxFactory.Token(New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxKind.ExclamationToken, New SyntaxTriviaList(SyntaxFactory.WhitespaceTrivia(" ")), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 98Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 124Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind))) 126token = SyntaxFactory.Token(CType(k, SyntaxKind), SyntaxFacts.GetText(CType(k, SyntaxKind)).ToUpperInvariant) 128Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind)).ToUpperInvariant)
TestSyntaxNodes.vb (1)
1142If SyntaxFacts.IsKeywordKind(token.Kind) Then
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
BasicTestBase.vb (1)
752Private ReadOnly _kinds As New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer)
ParserTestUtilities.vb (1)
13Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts
Microsoft.CodeAnalysis.VisualBasic.Workspaces (76)
CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (2)
144If expression IsNot Nothing AndAlso SyntaxFacts.IsInNamespaceOrTypeContext(expression) AndAlso Not IsNamespaceOrTypeRelatedSymbol(symbol) Then 307If remText <> remKeywordText AndAlso SyntaxFacts.GetKeywordKind(remText) = SyntaxKind.REMKeyword Then
Classification\ClassificationHelpers.vb (2)
23ElseIf SyntaxFacts.IsKeywordKind(token.Kind) Then 27ElseIf SyntaxFacts.IsPunctuation(token.Kind) Then
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (6)
64Private Shared ReadOnly s_removeDimKeywordSet As HashSet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From { 68Private Shared ReadOnly s_normalizeOperatorsSet As Dictionary(Of SyntaxKind, List(Of SyntaxKind)) = New Dictionary(Of SyntaxKind, List(Of SyntaxKind))(SyntaxFacts.EqualityComparer) From { 78Debug.Assert(String.Join(",", s_modifierKindsInOrder.Select(AddressOf SyntaxFacts.GetText)) = VisualBasicIdeCodeStyleOptions.Default.PreferredModifierOrder.Value) 276If token.IsMissing OrElse Not (SyntaxFacts.IsOperator(token.Kind) OrElse token.IsKind(SyntaxKind.ColonEqualsToken)) Then 281Dim expectedText = SyntaxFacts.GetText(token.Kind) 311If Not SyntaxFacts.IsOperatorStatementOperatorToken(last.Kind) Then
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (2)
141If SyntaxFacts.AllowsTrailingImplicitLineContinuation(token1) OrElse 142SyntaxFacts.AllowsLeadingImplicitLineContinuation(token2) Then
CodeGeneration\OperatorGenerator.vb (1)
40Dim operatorSyntaxKind = SyntaxFacts.GetOperatorKind(method.MetadataName)
CodeGeneration\VisualBasicCodeGenerationService.vb (1)
660Function(modifier) SyntaxFacts.IsAccessibilityModifier(modifier.Kind()))
CodeGeneration\VisualBasicDeclarationComparer.vb (2)
11Private Shared ReadOnly s_kindPrecedenceMap As Dictionary(Of SyntaxKind, Integer) = New Dictionary(Of SyntaxKind, Integer)(SyntaxFacts.EqualityComparer) From 35Private Shared ReadOnly s_operatorPrecedenceMap As Dictionary(Of SyntaxKind, Integer) = New Dictionary(Of SyntaxKind, Integer)(SyntaxFacts.EqualityComparer) From
CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
37If Not SyntaxFacts.IsValidIdentifier(name) Then
Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.vb (1)
55Contract.ThrowIfFalse(SyntaxFacts.IsPreprocessorDirective(trivia.Kind))
Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
58If trivia.Kind = SyntaxKind.RegionDirectiveTrivia OrElse trivia.Kind = SyntaxKind.EndRegionDirectiveTrivia OrElse SyntaxFacts.IsPreprocessorDirective(trivia.Kind) Then 256If Not SyntaxFacts.IsPreprocessorDirective(trivia.Kind) Then
Formatting\Engine\Trivia\TriviaDataFactory.LineContinuationTrivia.vb (1)
30builder.Append(SyntaxFacts.GetText(SyntaxKind.LineContinuationTrivia))
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (3)
44Return Char.IsWhiteSpace(ch) OrElse SyntaxFacts.IsWhitespace(ch) 48Return SyntaxFacts.IsNewLine(ch) 108If SyntaxFacts.IsPreprocessorDirective(trivia2.Kind) Then
Formatting\Rules\AdjustSpaceFormattingRule.vb (1)
152If SyntaxFacts.IsPredefinedCastExpressionKeyword(previousToken.Kind) Then
Formatting\Rules\ElasticTriviaFormattingRule.vb (1)
363Return list.Sum(Function(t) t.ToFullString().Replace(vbCrLf, vbCr).OfType(Of Char).Count(Function(c) SyntaxFacts.IsNewLine(c)))
Formatting\Rules\StructuredTriviaFormattingRule.vb (1)
26If previousToken.Kind = SyntaxKind.HashToken AndAlso SyntaxFacts.IsPreprocessorKeyword(CType(currentToken.Kind, SyntaxKind)) Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb\SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb\SyntaxTokenExtensions.vb (1)
61SyntaxFacts.AllowsTrailingImplicitLineContinuation(token)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\ExpressionSyntaxExtensions.vb (1)
296Dim identifierValue = SyntaxFacts.MakeHalfWidthIdentifier(identifier.Identifier.ValueText)
Rename\VisualBasicRenameRewriterLanguageService.vb (8)
526Dim isAttributeName = SyntaxFacts.IsAttributeName(parent) 571(SyntaxFacts.GetKeywordKind(valueText) = SyntaxKind.REMKeyword OrElse Me._syntaxFactsService.IsVerbatimIdentifier(newToken)) Then 645Dim newIdentifierToken = SyntaxFactory.XmlNameToken(newToken.LeadingTrivia, _replacementText, SyntaxFacts.GetKeywordKind(_replacementText), newToken.TrailingTrivia) 876replacementText = SyntaxFacts.MakeHalfWidthIdentifier(replacementText) 972Dim halfWidthReplacementText = SyntaxFacts.MakeHalfWidthIdentifier(replacementText) 995Dim kind = SyntaxFacts.GetKeywordKind(replacementText) 997valueText = SyntaxFacts.GetText(kind) 1037Dim isInNamespaceOrTypeContext = SyntaxFacts.IsInNamespaceOrTypeContext(TryCast(syntax, ExpressionSyntax))
Simplification\Reducers\VisualBasicEscapingReducer.vb (8)
42If SyntaxFacts.GetKeywordKind(unescapedIdentifier) = SyntaxKind.REMKeyword Then 49If SyntaxFacts.GetKeywordKind(unescapedIdentifier) <> SyntaxKind.None Then 68If SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) = SyntaxKind.AwaitKeyword Then 87If SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) = SyntaxKind.MidKeyword Then 98If SyntaxFacts.GetKeywordKind(unescapedIdentifier) = SyntaxKind.NewKeyword Then 115If SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) = SyntaxKind.GroupKeyword Then 132Select Case SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) 221SyntaxFacts.GetContextualKeywordKind(node.Identifier.GetIdentifierText()) = SyntaxKind.PreserveKeyword AndAlso
Simplification\Simplifiers\NameSimplifier.vb (1)
360If SyntaxFacts.IsAttributeName(name) AndAlso Not isIdentifierNameFromAlias Then
Simplification\VisualBasicSimplificationService.Expander.vb (2)
349If name Is Nothing OrElse SyntaxFacts.IsReservedTupleElementName(name) Then 774If SyntaxFacts.IsInNamespaceOrTypeContext(originalNode) OrElse TypeOf (parent) Is CrefReferenceSyntax Then
SpecialFormattingOperation.vb (2)
65If SyntaxFacts.AllowsTrailingImplicitLineContinuation(endToken) OrElse 66SyntaxFacts.AllowsLeadingImplicitLineContinuation(nextToken) OrElse
SpeculationAnalyzer.vb (4)
113Dim isInNamespaceOrTypeContext = SyntaxFacts.IsInNamespaceOrTypeContext(TryCast(originalNode, ExpressionSyntax)) 354If SyntaxFacts.IsAssignmentStatementOperatorToken(originalAssignmentStatement.OperatorToken.Kind()) Then 504If SyntaxFacts.IsAssignmentStatementOperatorToken(operatorTokenKind) AndAlso 536Return SyntaxFacts.IsInNamespaceOrTypeContext(node)
StringExtensions.vb (3)
9Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 22Dim halfWidthValueText = SyntaxFacts.MakeHalfWidthIdentifier(identifierText) 35Dim keywordKind = SyntaxFacts.GetKeywordKind(text)
SymbolDisplayPartExtensions.vb (1)
20If SyntaxFacts.GetKeywordKind(text) <> SyntaxKind.None Then
SyntaxKindSet.vb (1)
8Public ReadOnly AllOperators As ISet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From
SyntaxNodeExtensions.vb (5)
230Return SyntaxFacts.IsMultiLineLambdaExpression(node.Kind()) 284Dim hasLeadingDirective = node.GetLeadingTrivia().Any(Function(t) SyntaxFacts.IsPreprocessorDirective(t.Kind)) 830SyntaxFacts.IsAssignmentStatement(node.Kind) 1103If SyntaxFacts.IsSingleLineLambdaExpression(current.Kind) OrElse 1104SyntaxFacts.IsMultiLineLambdaExpression(current.Kind) Then
Utilities\IntrinsicOperators\PredefinedCastExpressionDocumentation.vb (1)
14_keywordText = SyntaxFacts.GetText(keywordKind)
VisualBasicSimplificationHelpers.vb (2)
24If SyntaxFacts.GetKeywordKind(unescapedIdentifier) = SyntaxKind.None AndAlso SyntaxFacts.GetContextualKeywordKind(unescapedIdentifier) = SyntaxKind.None Then
VisualBasicSyntaxFacts.vb (7)
13Imports Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts 100Dim keywordKind = SyntaxFacts.GetKeywordKind(identifier) 451Return SyntaxFacts.GetText(CType(kind, SyntaxKind)) 455Return SyntaxFacts.IsIdentifierPartCharacter(c) 459Return SyntaxFacts.IsIdentifierStartCharacter(c) 577Return SyntaxFacts.IsInNamespaceOrTypeContext(node) 1443Return SyntaxFacts.IsPreprocessorDirective(trivia.Kind())
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
CodeModel\VisualBasicCodeModelService.vb (2)
1874Dim contextualKeywordKind = SyntaxFacts.GetContextualKeywordKind(target) 4025Select Case SyntaxFacts.GetKeywordKind(identifier)
Snippets\SnippetCommandHandler.vb (1)
105If (caretPosition > 1 AndAlso text(caretPosition - 1) = "?"c AndAlso Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts.IsWhitespace(text(caretPosition - 2))) OrElse