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