108 references to ScanTypeFlags
Microsoft.CodeAnalysis.CSharp (108)
Parser\LanguageParser.cs (107)
1548if (ScanType() != ScanTypeFlags.NotType) 1668if (this.ScanType() == ScanTypeFlags.NotType) 6144ScanTypeFlags possibleTypeArgumentFlags = ScanPossibleTypeArgumentList( 6147if (possibleTypeArgumentFlags == ScanTypeFlags.NotType) 6240private ScanTypeFlags ScanPossibleTypeArgumentList( 6261return ScanTypeFlags.GenericTypeOrMethod; 6264ScanTypeFlags result = ScanTypeFlags.GenericTypeOrExpression; 6265ScanTypeFlags lastScannedType; 6275return ScanTypeFlags.NotType; 6296case ScanTypeFlags.NotType: 6298return ScanTypeFlags.NotType; 6300case ScanTypeFlags.MustBeType: 6323result = ScanTypeFlags.GenericTypeOrMethod; 6347case ScanTypeFlags.NullableType: 6352result = ScanTypeFlags.GenericTypeOrMethod; 6365case ScanTypeFlags.GenericTypeOrExpression: 6372result = ScanTypeFlags.GenericTypeOrMethod; 6376case ScanTypeFlags.GenericTypeOrMethod: 6377result = ScanTypeFlags.GenericTypeOrMethod; 6380case ScanTypeFlags.NonGenericTypeOrExpression: 6406if (lastScannedType is ScanTypeFlags.TupleType && this.CurrentToken.Kind is SyntaxKind.OpenParenToken) 6413return ScanTypeFlags.NotType; 6422result = ScanTypeFlags.GenericTypeOrMethod; 7049private ScanTypeFlags ScanType(bool forPattern = false) 7054private ScanTypeFlags ScanType(out SyntaxToken lastTokenOfType, bool forPattern = false) 7064private ScanTypeFlags ScanNamedTypePart(out SyntaxToken lastTokenOfType) 7069return ScanTypeFlags.NotType; 7079return ScanTypeFlags.NonGenericTypeOrExpression; 7083private ScanTypeFlags ScanType(ParseTypeMode mode, out SyntaxToken lastTokenOfType) 7086ScanTypeFlags result; 7105result = ScanTypeFlags.NonGenericTypeOrExpression; 7123if (result == ScanTypeFlags.NotType) 7125return ScanTypeFlags.NotType; 7128Debug.Assert(result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.GenericTypeOrMethod or ScanTypeFlags.NonGenericTypeOrExpression); 7144if (result == ScanTypeFlags.NotType) 7146return ScanTypeFlags.NotType; 7149Debug.Assert(result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.GenericTypeOrMethod or ScanTypeFlags.NonGenericTypeOrExpression); 7154result = ScanTypeFlags.AliasQualifiedName; 7161result = ScanTypeFlags.MustBeType; 7168if (result == ScanTypeFlags.NotType || mode == ParseTypeMode.DefinitePattern && this.CurrentToken.Kind != SyntaxKind.OpenBracketToken) 7171return ScanTypeFlags.NotType; 7182return ScanTypeFlags.NotType; 7194result = ScanTypeFlags.NullableType; 7215if (result is ScanTypeFlags.GenericTypeOrExpression or ScanTypeFlags.NonGenericTypeOrExpression) 7217result = ScanTypeFlags.PointerOrMultiplication; 7219else if (result == ScanTypeFlags.GenericTypeOrMethod) 7221result = ScanTypeFlags.MustBeType; 7237return ScanTypeFlags.NotType; 7241result = ScanTypeFlags.MustBeType; 7257private ScanTypeFlags ScanTupleType(out SyntaxToken lastTokenOfType) 7259var tupleElementType = ScanType(out lastTokenOfType); 7260if (tupleElementType != ScanTypeFlags.NotType) 7274if (tupleElementType == ScanTypeFlags.NotType) 7277return ScanTypeFlags.NotType; 7290return ScanTypeFlags.TupleType; 7297return ScanTypeFlags.NotType; 7301private ScanTypeFlags ScanFunctionPointerType(out SyntaxToken lastTokenOfType) 7324return ScanTypeFlags.MustBeType; 7364return ScanTypeFlags.MustBeType; 7406return ScanTypeFlags.MustBeType; 8492ScanTypeFlags st = this.ScanType(); 8497if (st == ScanTypeFlags.MustBeType && this.CurrentToken.Kind is not SyntaxKind.DotToken and not SyntaxKind.OpenParenToken) 8502if (st == ScanTypeFlags.NotType) 8515return st == ScanTypeFlags.GenericTypeOrExpression && (IsDefiniteStatement() || IsTypeDeclarationStart() || IsAccessibilityModifier(CurrentToken.Kind)); 8521if (st == ScanTypeFlags.PointerOrMultiplication) 8525else if (st == ScanTypeFlags.NullableType) 8789var scanResult = this.ScanTupleType(out _); 8793if (scanResult == ScanTypeFlags.TupleType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken) 8878ScanTypeFlags st = this.ScanType(); 8880return !IsPossibleMemberName() || st == ScanTypeFlags.NotType; 9447this.ScanType() != ScanTypeFlags.NotType && 9522isDeclaration = ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken; 9534this.ScanType() != ScanTypeFlags.NotType && 9725if (ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken) 9758if (ScanType(mode, out lastTokenOfType) == ScanTypeFlags.NotType) 10204ScanTypeFlags st; 10208st = ScanTypeFlags.NotType; 10225if (st == ScanTypeFlags.NullableType) 10287private bool IsUsingStatementVariableDeclaration(ScanTypeFlags st) 10289Debug.Assert(st != ScanTypeFlags.NullableType); 10291bool condition1 = st == ScanTypeFlags.MustBeType && this.CurrentToken.Kind != SyntaxKind.DotToken; 10292bool condition2 = st != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken; 10293bool condition3 = st == ScanTypeFlags.NonGenericTypeOrExpression || this.PeekToken(1).Kind == SyntaxKind.EqualsToken; 10449if (ScanType() is ScanTypeFlags.NotType || 10696if (ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind == SyntaxKind.IdentifierToken) 12598this.ScanType() == ScanTypeFlags.NotType) 12735var type = this.ScanType(forPattern); 12736if (type == ScanTypeFlags.NotType) 12761case ScanTypeFlags.PointerOrMultiplication: 12762case ScanTypeFlags.NullableType: 12763case ScanTypeFlags.MustBeType: 12764case ScanTypeFlags.AliasQualifiedName: 12786case ScanTypeFlags.GenericTypeOrMethod: 12787case ScanTypeFlags.TupleType: 12797case ScanTypeFlags.GenericTypeOrExpression: 12798case ScanTypeFlags.NonGenericTypeOrExpression: 12942var st = ScanType(); 12943if (st == ScanTypeFlags.NotType || this.CurrentToken.Kind != SyntaxKind.OpenParenToken) 13221ScanTypeFlags scanTypeFlags = ScanTupleType(out _); 13222if (scanTypeFlags != ScanTypeFlags.NotType) 13916return this.ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind is SyntaxKind.IdentifierToken or SyntaxKind.InKeyword;
Parser\LanguageParser_Patterns.cs (1)
481return ScanType(forPattern: true) != ScanTypeFlags.NotType;