105 references to ScanTypeFlags
Microsoft.CodeAnalysis.CSharp (105)
Parser\LanguageParser.cs (104)
1541if (ScanType() != ScanTypeFlags.NotType) 1660if (this.ScanType() == ScanTypeFlags.NotType) 5933ScanTypeFlags possibleTypeArgumentFlags = ScanPossibleTypeArgumentList( 5936if (possibleTypeArgumentFlags == ScanTypeFlags.NotType) 6029private ScanTypeFlags ScanPossibleTypeArgumentList( 6050return ScanTypeFlags.GenericTypeOrMethod; 6053ScanTypeFlags result = ScanTypeFlags.GenericTypeOrExpression; 6054ScanTypeFlags lastScannedType; 6064return ScanTypeFlags.NotType; 6085case ScanTypeFlags.NotType: 6087return ScanTypeFlags.NotType; 6089case ScanTypeFlags.MustBeType: 6112result = ScanTypeFlags.GenericTypeOrMethod; 6136case ScanTypeFlags.NullableType: 6141result = ScanTypeFlags.GenericTypeOrMethod; 6154case ScanTypeFlags.GenericTypeOrExpression: 6161result = ScanTypeFlags.GenericTypeOrMethod; 6165case ScanTypeFlags.GenericTypeOrMethod: 6166result = ScanTypeFlags.GenericTypeOrMethod; 6169case ScanTypeFlags.NonGenericTypeOrExpression: 6195if (lastScannedType is ScanTypeFlags.TupleType && this.CurrentToken.Kind is SyntaxKind.OpenParenToken) 6202return ScanTypeFlags.NotType; 6211result = ScanTypeFlags.GenericTypeOrMethod; 6838private ScanTypeFlags ScanType(bool forPattern = false) 6843private ScanTypeFlags ScanType(out SyntaxToken lastTokenOfType, bool forPattern = false) 6853private ScanTypeFlags ScanNamedTypePart(out SyntaxToken lastTokenOfType) 6858return ScanTypeFlags.NotType; 6868return ScanTypeFlags.NonGenericTypeOrExpression; 6872private ScanTypeFlags ScanType(ParseTypeMode mode, out SyntaxToken lastTokenOfType) 6875ScanTypeFlags result; 6894result = ScanTypeFlags.NonGenericTypeOrExpression; 6912if (result == ScanTypeFlags.NotType) 6914return ScanTypeFlags.NotType; 6917Debug.Assert(result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.GenericTypeOrMethod or ScanTypeFlags.NonGenericTypeOrExpression); 6933if (result == ScanTypeFlags.NotType) 6935return ScanTypeFlags.NotType; 6938Debug.Assert(result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.GenericTypeOrMethod or ScanTypeFlags.NonGenericTypeOrExpression); 6943result = ScanTypeFlags.AliasQualifiedName; 6950result = ScanTypeFlags.MustBeType; 6957if (result == ScanTypeFlags.NotType || mode == ParseTypeMode.DefinitePattern && this.CurrentToken.Kind != SyntaxKind.OpenBracketToken) 6960return ScanTypeFlags.NotType; 6971return ScanTypeFlags.NotType; 6983result = ScanTypeFlags.NullableType; 7004if (result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.NonGenericTypeOrExpression) 7006result = ScanTypeFlags.PointerOrMultiplication; 7008else if (result == ScanTypeFlags.GenericTypeOrMethod) 7010result = ScanTypeFlags.MustBeType; 7026return ScanTypeFlags.NotType; 7030result = ScanTypeFlags.MustBeType; 7046private ScanTypeFlags ScanTupleType(out SyntaxToken lastTokenOfType) 7048var tupleElementType = ScanType(out lastTokenOfType); 7049if (tupleElementType != ScanTypeFlags.NotType) 7063if (tupleElementType == ScanTypeFlags.NotType) 7066return ScanTypeFlags.NotType; 7079return ScanTypeFlags.TupleType; 7086return ScanTypeFlags.NotType; 7090private ScanTypeFlags ScanFunctionPointerType(out SyntaxToken lastTokenOfType) 7113return ScanTypeFlags.MustBeType; 7153return ScanTypeFlags.MustBeType; 7195return ScanTypeFlags.MustBeType; 8286ScanTypeFlags st = this.ScanType(); 8291if (st == ScanTypeFlags.MustBeType && this.CurrentToken.Kind is not SyntaxKind.DotToken and not SyntaxKind.OpenParenToken) 8296if (st == ScanTypeFlags.NotType || this.CurrentToken.Kind != SyntaxKind.IdentifierToken) 8304if (st == ScanTypeFlags.PointerOrMultiplication) 8308else if (st == ScanTypeFlags.NullableType) 8605ScanTypeFlags st = this.ScanType(); 8607return !IsPossibleMemberName() || st == ScanTypeFlags.NotType; 9156this.ScanType() != ScanTypeFlags.NotType && 9231isDeclaration = ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken; 9243this.ScanType() != ScanTypeFlags.NotType && 9434if (ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken) 9467if (ScanType(mode, out lastTokenOfType) == ScanTypeFlags.NotType) 9913ScanTypeFlags st; 9917st = ScanTypeFlags.NotType; 9934if (st == ScanTypeFlags.NullableType) 9996private bool IsUsingStatementVariableDeclaration(ScanTypeFlags st) 9998Debug.Assert(st != ScanTypeFlags.NullableType); 10000bool condition1 = st == ScanTypeFlags.MustBeType && this.CurrentToken.Kind != SyntaxKind.DotToken; 10001bool condition2 = st != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken; 10002bool condition3 = st == ScanTypeFlags.NonGenericTypeOrExpression || this.PeekToken(1).Kind == SyntaxKind.EqualsToken; 10147if (ScanType() == ScanTypeFlags.NotType || 10380if (ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken) 12276if (this.ScanType() == ScanTypeFlags.NotType) 12414var type = this.ScanType(forPattern); 12415if (type == ScanTypeFlags.NotType) 12440case ScanTypeFlags.PointerOrMultiplication: 12441case ScanTypeFlags.NullableType: 12442case ScanTypeFlags.MustBeType: 12443case ScanTypeFlags.AliasQualifiedName: 12465case ScanTypeFlags.GenericTypeOrMethod: 12466case ScanTypeFlags.TupleType: 12476case ScanTypeFlags.GenericTypeOrExpression: 12477case ScanTypeFlags.NonGenericTypeOrExpression: 12621var st = ScanType(); 12622if (st == ScanTypeFlags.NotType || this.CurrentToken.Kind != SyntaxKind.OpenParenToken) 12895ScanTypeFlags scanTypeFlags = ScanTupleType(out _); 12896if (scanTypeFlags != ScanTypeFlags.NotType) 13608return this.ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind is SyntaxKind.IdentifierToken or SyntaxKind.InKeyword;
Parser\LanguageParser_Patterns.cs (1)
481return ScanType(forPattern: true) != ScanTypeFlags.NotType;