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