Skip to content

Commit

Permalink
Remove capturing lambdas from the language parser. (#39829)
Browse files Browse the repository at this point in the history
Remove capturing lambdas from the language parser.
  • Loading branch information
333fred authored Nov 14, 2019
2 parents ef05ad1 + 2bfc08d commit 69e2c2b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1786,8 +1786,8 @@ private PostSkipAction SkipBadTypeParameterConstraintTokens(SeparatedSyntaxListB
CSharpSyntaxNode tmp = null;
Debug.Assert(list.Count > 0);
return this.SkipBadSeparatedListTokensWithExpectedKind(ref tmp, list,
p => this.CurrentToken.Kind != SyntaxKind.CommaToken && !this.IsPossibleTypeParameterConstraint(),
p => this.CurrentToken.Kind == SyntaxKind.OpenBraceToken || this.IsCurrentTokenWhereOfConstraintClause() || this.IsTerminator(),
p => p.CurrentToken.Kind != SyntaxKind.CommaToken && !p.IsPossibleTypeParameterConstraint(),
p => p.CurrentToken.Kind == SyntaxKind.OpenBraceToken || p.IsCurrentTokenWhereOfConstraintClause() || p.IsTerminator(),
expected);
}

Expand Down Expand Up @@ -4025,8 +4025,8 @@ private PostSkipAction SkipBadVariableListTokens(SeparatedSyntaxListBuilder<Vari
CSharpSyntaxNode tmp = null;
Debug.Assert(list.Count > 0);
return this.SkipBadSeparatedListTokensWithExpectedKind(ref tmp, list,
p => this.CurrentToken.Kind != SyntaxKind.CommaToken,
p => this.CurrentToken.Kind == SyntaxKind.SemicolonToken || this.IsTerminator(),
p => p.CurrentToken.Kind != SyntaxKind.CommaToken,
p => p.CurrentToken.Kind == SyntaxKind.SemicolonToken || p.IsTerminator(),
expected);
}

Expand Down Expand Up @@ -4840,8 +4840,8 @@ private PostSkipAction SkipBadTypeParameterListTokens(SeparatedSyntaxListBuilder
CSharpSyntaxNode tmp = null;
Debug.Assert(list.Count > 0);
return this.SkipBadSeparatedListTokensWithExpectedKind(ref tmp, list,
p => this.CurrentToken.Kind != SyntaxKind.CommaToken,
p => this.CurrentToken.Kind == SyntaxKind.GreaterThanToken || this.IsTerminator(),
p => p.CurrentToken.Kind != SyntaxKind.CommaToken,
p => p.CurrentToken.Kind == SyntaxKind.GreaterThanToken || p.IsTerminator(),
expected);
}

Expand Down Expand Up @@ -5236,8 +5236,8 @@ private PostSkipAction SkipBadTypeArgumentListTokens(SeparatedSyntaxListBuilder<
CSharpSyntaxNode tmp = null;
Debug.Assert(list.Count > 0);
return this.SkipBadSeparatedListTokensWithExpectedKind(ref tmp, list,
p => this.CurrentToken.Kind != SyntaxKind.CommaToken && !this.IsPossibleType(),
p => this.CurrentToken.Kind == SyntaxKind.GreaterThanToken || this.IsTerminator(),
p => p.CurrentToken.Kind != SyntaxKind.CommaToken && !p.IsPossibleType(),
p => p.CurrentToken.Kind == SyntaxKind.GreaterThanToken || p.IsTerminator(),
expected);
}

Expand Down Expand Up @@ -10703,7 +10703,7 @@ private PostSkipAction SkipBadArrayInitializerTokens(ref SyntaxToken openBrace,
{
return this.SkipBadSeparatedListTokensWithExpectedKind(ref openBrace, list,
p => p.CurrentToken.Kind != SyntaxKind.CommaToken && !p.IsPossibleVariableInitializer(),
p => this.CurrentToken.Kind == SyntaxKind.CloseBraceToken || this.IsTerminator(),
p => p.CurrentToken.Kind == SyntaxKind.CloseBraceToken || p.IsTerminator(),
expected);
}

Expand Down

0 comments on commit 69e2c2b

Please sign in to comment.