115 references to TerminatorState
Microsoft.CodeAnalysis.CSharp (115)
Parser\LanguageParser.cs (109)
32
private
TerminatorState
_termState; // Resettable
92
private const int LastTerminatorState = (int)
TerminatorState
.IsPatternInSwitchExpressionArm;
103
switch (_termState & (
TerminatorState
)i)
105
case
TerminatorState
.IsNamespaceMemberStartOrStop when this.IsNamespaceMemberStartOrStop():
106
case
TerminatorState
.IsAttributeDeclarationTerminator when this.IsAttributeDeclarationTerminator():
107
case
TerminatorState
.IsPossibleAggregateClauseStartOrStop when this.IsPossibleAggregateClauseStartOrStop():
108
case
TerminatorState
.IsPossibleMemberStartOrStop when this.IsPossibleMemberStartOrStop():
109
case
TerminatorState
.IsEndOfReturnType when this.IsEndOfReturnType():
110
case
TerminatorState
.IsEndOfParameterList when this.IsEndOfParameterList():
111
case
TerminatorState
.IsEndOfFieldDeclaration when this.IsEndOfFieldDeclaration():
112
case
TerminatorState
.IsPossibleEndOfVariableDeclaration when this.IsPossibleEndOfVariableDeclaration():
113
case
TerminatorState
.IsEndOfTypeArgumentList when this.IsEndOfTypeArgumentList():
114
case
TerminatorState
.IsPossibleStatementStartOrStop when this.IsPossibleStatementStartOrStop():
115
case
TerminatorState
.IsEndOfFixedStatement when this.IsEndOfFixedStatement():
116
case
TerminatorState
.IsEndOfTryBlock when this.IsEndOfTryBlock():
117
case
TerminatorState
.IsEndOfCatchClause when this.IsEndOfCatchClause():
118
case
TerminatorState
.IsEndOfFilterClause when this.IsEndOfFilterClause():
119
case
TerminatorState
.IsEndOfCatchBlock when this.IsEndOfCatchBlock():
120
case
TerminatorState
.IsEndOfDoWhileExpression when this.IsEndOfDoWhileExpression():
121
case
TerminatorState
.IsEndOfForStatementArgument when this.IsEndOfForStatementArgument():
122
case
TerminatorState
.IsEndOfDeclarationClause when this.IsEndOfDeclarationClause():
123
case
TerminatorState
.IsEndOfArgumentList when this.IsEndOfArgumentList():
124
case
TerminatorState
.IsSwitchSectionStart when this.IsPossibleSwitchSection():
125
case
TerminatorState
.IsEndOfTypeParameterList when this.IsEndOfTypeParameterList():
126
case
TerminatorState
.IsEndOfMethodSignature when this.IsEndOfMethodSignature():
127
case
TerminatorState
.IsEndOfNameInExplicitInterface when this.IsEndOfNameInExplicitInterface():
128
case
TerminatorState
.IsEndOfFunctionPointerParameterList when this.IsEndOfFunctionPointerParameterList(errored: false):
129
case
TerminatorState
.IsEndOfFunctionPointerParameterListErrored when this.IsEndOfFunctionPointerParameterList(errored: true):
130
case
TerminatorState
.IsEndOfFunctionPointerCallingConvention when this.IsEndOfFunctionPointerCallingConvention():
131
case
TerminatorState
.IsEndOfTypeSignature when this.IsEndOfTypeSignature():
574
var
saveTerm = _termState;
575
_termState |=
TerminatorState
.IsNamespaceMemberStartOrStop;
1068
var
saveTerm = _termState;
1069
_termState |=
TerminatorState
.IsAttributeDeclarationTerminator;
1733
var
outerSaveTerm = _termState;
1734
_termState |=
TerminatorState
.IsEndOfTypeSignature;
1736
var
saveTerm = _termState;
1737
_termState |=
TerminatorState
.IsPossibleAggregateClauseStartOrStop;
1808
var
saveTerm2 = _termState;
1809
_termState |=
TerminatorState
.IsPossibleMemberStartOrStop;
2092
Debug.Assert((_termState &
TerminatorState
.IsEndOfTypeSignature) != 0);
2201
|| ((_termState &
TerminatorState
.IsEndOfTypeSignature) != 0 && this.CurrentToken.Kind == SyntaxKind.SemicolonToken)
2527
var
saveTermState = _termState;
2697
var
saveTerm = _termState;
2698
_termState |=
TerminatorState
.IsPossibleStatementStartOrStop; // partial statements can abort if a new statement starts
2746
var
saveTerm = _termState;
2751
_termState |=
TerminatorState
.IsPossibleStatementStartOrStop;
2877
var
saveTerm = _termState;
2878
_termState |=
TerminatorState
.IsPossibleStatementStartOrStop; // partial statements can abort if a new statement starts
3099
var
saveTermState = _termState;
3357
var
saveTerm = _termState;
3358
_termState |=
TerminatorState
.IsEndOfMethodSignature;
3524
var
saveTerm = _termState;
3525
_termState |=
TerminatorState
.IsEndOfMethodSignature;
3579
var
saveTerm = _termState;
3580
_termState |=
TerminatorState
.IsEndOfReturnType;
4643
var
saveTerm = _termState;
4644
_termState |=
TerminatorState
.IsEndOfParameterList;
5060
var
saveTerm = _termState;
5061
_termState |=
TerminatorState
.IsEndOfFieldDeclaration;
5369
TerminatorState
saveTerm = _termState;
5429
_termState |=
TerminatorState
.IsPossibleEndOfVariableDeclaration;
5437
_termState |=
TerminatorState
.IsPossibleEndOfVariableDeclaration;
5570
var
saveTerm = _termState;
5571
_termState |=
TerminatorState
.IsEndOfMethodSignature;
5853
var
saveTerm = _termState;
5854
_termState |=
TerminatorState
.IsEndOfTypeParameterList;
5913
var
saveTerm = _termState;
5914
_termState =
TerminatorState
.IsEndOfTypeArgumentList;
6437
var
saveTerm = _termState;
6438
_termState =
TerminatorState
.IsEndOfTypeArgumentList;
6647
var
saveTerm = _termState;
6648
_termState |=
TerminatorState
.IsEndOfNameInExplicitInterface;
7167
TerminatorState
saveTerm;
7191
_termState |=
TerminatorState
.IsEndOfFunctionPointerCallingConvention;
7230
_termState |= validStartingToken ?
TerminatorState
.IsEndOfFunctionPointerParameterList :
TerminatorState
.IsEndOfFunctionPointerParameterListErrored;
7786
var
saveTerm = _termState;
7787
_termState |= (lessThanToken.IsMissing ?
TerminatorState
.IsEndOfFunctionPointerParameterListErrored :
TerminatorState
.IsEndOfFunctionPointerParameterList);
7874
var
saveTerm = _termState;
7875
_termState |=
TerminatorState
.IsEndOfFunctionPointerCallingConvention;
8486
var
saveTerm = _termState;
8487
_termState |=
TerminatorState
.IsEndOfFieldDeclaration;
8498
var
saveTerm = _termState;
8499
_termState |=
TerminatorState
.IsEndOfMethodSignature;
8820
var
saveTerm = _termState;
8821
_termState |=
TerminatorState
.IsPossibleStatementStartOrStop; // partial statements can abort if a new statement starts
8824
_termState |=
TerminatorState
.IsSwitchSectionStart;
8928
var
saveTerm = _termState;
8929
_termState |=
TerminatorState
.IsEndOfFixedStatement;
9026
var
saveTerm = _termState;
9027
_termState |=
TerminatorState
.IsEndOfTryBlock;
9088
var
saveTerm = _termState;
9094
_termState |=
TerminatorState
.IsEndOfCatchClause;
9124
_termState |=
TerminatorState
.IsEndOfFilterClause;
9133
_termState |=
TerminatorState
.IsEndOfCatchBlock;
9189
var
saveTerm = _termState;
9190
_termState |=
TerminatorState
.IsEndOfDoWhileExpression;
9247
var
saveTerm = _termState;
9248
_termState |=
TerminatorState
.IsEndOfForStatementArgument;
10388
var
saveTerm = _termState;
10389
_termState |=
TerminatorState
.IsEndOfDeclarationClause;
12088
var
saveTerm = _termState;
12089
_termState |=
TerminatorState
.IsEndOfArgumentList;
13480
var
saveTerm = _termState;
13481
_termState |=
TerminatorState
.IsEndOfParameterList;
14194
internal readonly
TerminatorState
TerminatorState;
14201
TerminatorState
terminatorState,
Parser\LanguageParser_Patterns.cs (6)
436
var
savedState = _termState;
437
_termState |=
TerminatorState
.IsExpressionOrPatternInCaseLabelOfSwitchStatement;
550
if (@this._termState.HasFlag(
TerminatorState
.IsExpressionOrPatternInCaseLabelOfSwitchStatement) && @this.CurrentToken.Kind is SyntaxKind.ColonToken)
559
if (@this._termState.HasFlag(
TerminatorState
.IsPatternInSwitchExpressionArm) && @this.CurrentToken.Kind is SyntaxKind.EqualsGreaterThanToken or SyntaxKind.ColonToken)
594
var
savedState = _termState;
595
_termState |=
TerminatorState
.IsPatternInSwitchExpressionArm;