237 references to ERR_UnexpectedToken
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Deconstruct.cs (2)
932
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText);
938
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText);
Binder\Binder_Expressions.cs (5)
816
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, firstToken.GetLocation(), firstToken.ValueText);
825
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, firstToken.GetLocation(), firstToken.ValueText);
832
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, firstToken.GetLocation(), firstToken.ValueText);
2992
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText);
2998
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText);
Binder\Binder_Symbols.cs (2)
491
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, refToken.GetLocation(), refToken.ToString());
505
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, scopedToken.GetLocation(), scopedToken.ToString());
Errors\ErrorFacts.cs (1)
1130
case ErrorCode.
ERR_UnexpectedToken
:
Parser\LanguageParser.cs (4)
1948
? this.AddError(this.EatToken(), ErrorCode.
ERR_UnexpectedToken
, SyntaxFacts.GetText(SyntaxKind.QuestionToken))
3158
initializer = this.AddErrorToFirstToken(initializer, ErrorCode.
ERR_UnexpectedToken
, colonToken.Text);
10479
ErrorCode errorCode = leftOperand.Kind == SyntaxKind.IsPatternExpression ? ErrorCode.
ERR_UnexpectedToken
: ErrorCode.WRN_PrecedenceInversion;
13184
node = this.AddError(node, ErrorCode.
ERR_UnexpectedToken
, trailingTrash[0].ToString());
Symbols\Source\SourceMethodSymbol.cs (1)
36
diagnostics.Add(ErrorCode.
ERR_UnexpectedToken
, refKeyword.GetLocation(), refKeyword.ToString());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (2)
1281
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 16),
1302
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(10, 20));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (12)
Semantics\PatternMatchingTests.cs (3)
4177
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "A as B < C, D >").WithArguments("E").WithLocation(1, 1)
4184
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "A is B < C").WithArguments(",").WithLocation(1, 1)
6176
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(7, 23),
Semantics\PatternMatchingTests_Scope.cs (7)
12062
(int)ErrorCode.
ERR_UnexpectedToken
,
12399
(int)ErrorCode.
ERR_UnexpectedToken
,
12558
(int)ErrorCode.
ERR_UnexpectedToken
,
12742
(int)ErrorCode.
ERR_UnexpectedToken
,
12977
(int)ErrorCode.
ERR_UnexpectedToken
,
13139
(int)ErrorCode.
ERR_UnexpectedToken
,
13299
(int)ErrorCode.
ERR_UnexpectedToken
,
Semantics\PatternMatchingTests3.cs (2)
547
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 40),
553
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 56));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (70)
Semantics\LambdaTests.cs (4)
5427
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 29),
5430
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 22));
5452
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 29),
5455
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 22));
Semantics\LocalFunctionTests.cs (2)
54
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 11),
60
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(10, 15),
Semantics\NullableReferenceTypesTests.cs (3)
95389
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "?").WithArguments("?").WithLocation(4, 30),
95392
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "?").WithArguments("?").WithLocation(6, 55),
95395
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "?").WithArguments("?").WithLocation(8, 45)
Semantics\OutVarTests.cs (7)
21195
(int)ErrorCode.
ERR_UnexpectedToken
,
21556
(int)ErrorCode.
ERR_UnexpectedToken
,
21721
(int)ErrorCode.
ERR_UnexpectedToken
,
21911
(int)ErrorCode.
ERR_UnexpectedToken
,
22158
(int)ErrorCode.
ERR_UnexpectedToken
,
22326
(int)ErrorCode.
ERR_UnexpectedToken
,
22492
(int)ErrorCode.
ERR_UnexpectedToken
,
Semantics\RefFieldTests.cs (47)
10841
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(7, 19),
11993
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(3, 2),
11999
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(4, 2),
12002
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 9),
12008
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(5, 2),
12011
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(5, 9),
12047
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(12, 2),
12053
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(13, 2),
12056
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(13, 9),
12062
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(14, 2),
12065
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(14, 9)
12403
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(3, 8),
12409
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(4, 8),
12412
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 15),
12418
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(5, 8),
12421
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(5, 15),
12457
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(12, 8),
12463
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(13, 8),
12466
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(13, 15),
12472
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "scoped").WithArguments("scoped").WithLocation(14, 8),
12475
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(14, 15)
20360
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 19),
20363
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 26)
26267
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 22),
26273
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 22)
26281
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 22),
26284
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 22)
26357
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 23),
26363
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 23)
26371
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(8, 23),
26374
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 23)
26435
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(2, 7),
26441
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 7),
26453
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(5, 14),
26462
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 14),
26473
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(2, 7),
26479
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 7),
26485
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(5, 14),
26491
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 14),
26536
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 12),
26542
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 16),
26554
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 31),
26563
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(7, 35),
26574
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 12),
26580
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 16),
26586
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(6, 31),
26592
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(7, 35),
Semantics\RefLocalsAndReturnsTests.cs (7)
4750
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 8),
4753
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 7)
4807
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(7, 21),
4848
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 2),
4851
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 2),
4887
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(2, 7),
4890
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(3, 7),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Source\MethodTests.cs (2)
2268
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 18),
2292
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(4, 18),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (136)
Parsing\AnonymousFunctionParsingTests.cs (2)
2039
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "delegate*<void> ptr = &static (").WithArguments(")").WithLocation(1, 1),
2054
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "delegate*<void> ptr = &static (").WithArguments(")").WithLocation(1, 1),
Parsing\DeclarationParsingTests.cs (2)
7117
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "?").WithArguments("?").WithLocation(2, 28)
7209
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "?").WithArguments("?").WithLocation(2, 28)
Parsing\DeclarationScopeParsingTests.cs (15)
1025
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(ref scoped ").WithArguments("int").WithLocation(1, 1),
1059
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(").WithArguments("in").WithLocation(1, 1),
1089
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(").WithArguments("out").WithLocation(1, 1),
1161
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(scoped ").WithArguments("scoped").WithLocation(1, 1),
1186
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(ref scoped ").WithArguments("scoped").WithLocation(1, 1),
10049
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (ref scoped int b ").WithArguments("in").WithLocation(2, 1),
10151
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (ref readonly scoped int c in collection").WithArguments(")").WithLocation(2, 1),
10235
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (ref scoped readonly int c in collection").WithArguments(")").WithLocation(2, 1),
10350
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (@scoped int a ").WithArguments("in").WithLocation(2, 1),
10448
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (@scoped ref int b ").WithArguments("in").WithLocation(2, 1),
10554
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (@scoped ref readonly int a in collection").WithArguments(")").WithLocation(2, 1),
11029
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (scoped scoped int a ").WithArguments("in").WithLocation(2, 1),
11083
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (scoped scoped var b ").WithArguments("in").WithLocation(2, 1),
11141
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (scoped var (b, c) ").WithArguments("in").WithLocation(2, 1),
11353
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "foreach (scoped ref int[M(out var b)] a ").WithArguments("in").WithLocation(2, 1),
Parsing\ExpressionParsingTests.cs (3)
5847
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "1. ").WithArguments(".2").WithLocation(1, 1),
5873
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "..").WithArguments(".").WithLocation(1, 1));
5888
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "1..").WithArguments(".").WithLocation(1, 1));
Parsing\LambdaAttributeParsingTests.cs (14)
280
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "[A]").WithArguments("ref").WithLocation(1, 1),
314
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "[A]").WithArguments("in").WithLocation(1, 1),
1210
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "-- [A] ()").WithArguments("=>").WithLocation(1, 1),
1255
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "! [A] ()").WithArguments("=>").WithLocation(1, 1),
1300
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(F) [A] ()").WithArguments("=>").WithLocation(1, 1));
1388
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "x * [A] ()").WithArguments("=>").WithLocation(1, 1),
1523
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "x ? [A] ()").WithArguments("=>").WithLocation(1, 1));
2271
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "_ = x is string ? [] y").WithArguments("=>").WithLocation(1, 1));
2326
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "_ = x is string ? [A] y").WithArguments("=>").WithLocation(1, 1));
2381
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "_ = x is string ? [return: A] y").WithArguments("=>").WithLocation(1, 1),
2590
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "x as string ? [A]").WithArguments("y").WithLocation(1, 1));
3565
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "[A]").WithArguments("delegate").WithLocation(1, 1),
3605
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "[return: A]").WithArguments("delegate").WithLocation(1, 1),
3648
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "d = [A] ").WithArguments("delegate").WithLocation(1, 1),
Parsing\LambdaParameterParsingTests.cs (12)
650
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int a, int ").WithArguments("b").WithLocation(1, 1),
695
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(__arglist)").WithArguments("=>").WithLocation(1, 1));
716
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int x, __arglist)").WithArguments("=>").WithLocation(1, 1));
2864
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int ").WithArguments("x").WithLocation(1, 1),
2938
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int ").WithArguments("x").WithLocation(1, 1),
3010
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int ").WithArguments("x").WithLocation(1, 1),
3235
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int ").WithArguments("x").WithLocation(1, 1),
4055
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(Func<int, int> ").WithArguments("l1").WithLocation(1, 1),
4607
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(int x = > 0) => x").WithArguments(";").WithLocation(1, 1),
4658
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(__arglist = null)").WithArguments("=>").WithLocation(1, 1));
5218
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "").WithArguments("static").WithLocation(1, 1));
5234
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "f = [A]").WithArguments("int").WithLocation(1, 1),
Parsing\LambdaReturnTypeParsingTests.cs (15)
211
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "T").WithArguments("x").WithLocation(1, 1));
217
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "T").WithArguments("x").WithLocation(1, 1));
237
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "T").WithArguments("F").WithLocation(1, 1));
253
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "async").WithArguments("T").WithLocation(1, 1));
272
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "").WithArguments("static").WithLocation(1, 1));
293
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "delegate ").WithArguments("T").WithLocation(1, 1),
323
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "delegate ").WithArguments("int").WithLocation(1, 1),
701
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "int? () => x").WithArguments(":").WithLocation(1, 1));
776
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "int[]? () => x").WithArguments(":").WithLocation(1, 1));
1507
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "delegate*<void>? () => x").WithArguments(":").WithLocation(1, 1));
1584
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "static T? () => x").WithArguments(":").WithLocation(1, 1));
1714
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "async").WithArguments("T").WithLocation(1, 1));
1772
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "[A] T? () => x").WithArguments(":").WithLocation(1, 1));
4616
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "x is T ()").WithArguments("=>").WithLocation(1, 1));
5092
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "var").WithArguments("x").WithLocation(1, 1));
Parsing\MemberDeclarationParsingTests.cs (12)
125
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "x").WithArguments("=").WithLocation(1, 1)
732
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "public int x;").WithArguments("public").WithLocation(1, 1)
781
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "async Task<SomeNamespace.SomeType Method").WithArguments("(").WithLocation(1, 1),
832
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "public Task<SomeNamespace.SomeType Method").WithArguments("(").WithLocation(1, 1),
883
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "async Task<SomeNamespace. Method").WithArguments("(").WithLocation(1, 1),
926
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "public Task<SomeNamespace. Method").WithArguments("(").WithLocation(1, 1),
1263
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "required Prop").WithArguments("{").WithLocation(1, 1),
1311
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "required required").WithArguments("{").WithLocation(1, 1),
1330
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "required required Prop").WithArguments("{").WithLocation(1, 1),
1426
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "required Field").WithArguments(";").WithLocation(1, 1),
1471
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "required required").WithArguments(";").WithLocation(1, 1),
6232
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "N.I. ").WithArguments("int").WithLocation(1, 1),
Parsing\NameParsingTests.cs (3)
81
Assert.Equal((int)ErrorCode.
ERR_UnexpectedToken
, name.Errors()[0].Code);
96
Assert.Equal((int)ErrorCode.
ERR_UnexpectedToken
, name.Errors()[0].Code);
111
Assert.Equal((int)ErrorCode.
ERR_UnexpectedToken
, name.Errors()[0].Code);
Parsing\NullableParsingTests.cs (2)
138
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(object[]??)").WithArguments("null").WithLocation(1, 1),
190
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "(object[?])").WithArguments("null").WithLocation(1, 1),
Parsing\PatternParsingTests.cs (7)
7839
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "a switch {}").WithArguments(".").WithLocation(1, 1));
7859
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "a switch {}").WithArguments("[").WithLocation(1, 1));
7879
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "a switch {}").WithArguments("(").WithLocation(1, 1));
7899
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "a switch {}").WithArguments("!").WithLocation(1, 1));
8220
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "+").WithArguments("+").WithLocation(1, 10)
8258
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "+").WithArguments("+").WithLocation(1, 9)
12001
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "_ = i is (1, ").WithArguments("}").WithLocation(1, 1),
Parsing\PatternParsingTests_ListPatterns.cs (6)
184
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "c is ()").WithArguments("[").WithLocation(1, 1));
211
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "c is {}").WithArguments("[").WithLocation(1, 1));
808
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "..").WithArguments("..").WithLocation(1, 12));
946
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "..").WithArguments("..").WithLocation(1, 11));
981
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "..").WithArguments("..").WithLocation(1, 16));
1031
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "..").WithArguments("..").WithLocation(1, 14));
Parsing\RawInterpolatedStringLiteralCompilingTests.cs (2)
679
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "").WithArguments("#").WithLocation(4, 2),
708
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "").WithArguments("#").WithLocation(4, 2),
Parsing\RecordParsing.cs (2)
1647
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "M() with { }").WithArguments(".").WithLocation(1, 1)
1855
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "with").WithArguments("with").WithLocation(1, 12)
Parsing\RefReadonlyTests.cs (3)
192
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 10),
195
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(9, 28),
198
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "ref").WithArguments("ref").WithLocation(11, 41));
Parsing\StatementParsingTests.cs (4)
33
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "").WithArguments("private").WithLocation(1, 1),
2765
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "await var ").WithArguments("a").WithLocation(1, 1),
3563
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "{ label: ").WithArguments("public").WithLocation(1, 1),
4118
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "_ = new (int, int) ? (x) ").WithArguments(":").WithLocation(1, 1),
Parsing\Utf8StringLiteralsParsingTests.cs (32)
250
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""").WithArguments("u8").WithLocation(1, 1)
266
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""").WithArguments("u").WithLocation(1, 1)
282
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""").WithArguments("8").WithLocation(1, 1)
299
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""u8").WithArguments("0").WithLocation(1, 1)
315
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "1L").WithArguments("0").WithLocation(1, 1)
331
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, "1").WithArguments("L").WithLocation(1, 1)
348
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""").WithArguments("u8").WithLocation(1, 1)
364
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""").WithArguments("u").WithLocation(1, 1)
380
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""").WithArguments("8").WithLocation(1, 1)
397
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""u8").WithArguments("0").WithLocation(1, 1)
414
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""").WithArguments("U8").WithLocation(1, 1)
430
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""").WithArguments("U").WithLocation(1, 1)
447
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"@""hello""U8").WithArguments("0").WithLocation(1, 1)
464
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""").WithArguments("U8").WithLocation(1, 1)
480
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""").WithArguments("U").WithLocation(1, 1)
497
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""hello""U8").WithArguments("0").WithLocation(1, 1)
513
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$""hello""").WithArguments("u8").WithLocation(1, 1)
534
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$@""hello""").WithArguments("u8").WithLocation(1, 1)
555
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$""hello""").WithArguments("U8").WithLocation(1, 1)
576
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$@""hello""").WithArguments("U8").WithLocation(1, 1)
636
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""hello""""""").WithArguments(suffix).WithLocation(1, 1)
654
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""hello""""""").WithArguments(suffix).WithLocation(1, 1)
670
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""hello""""""").WithArguments("8").WithLocation(1, 1)
689
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""hello""""""" + suffix.Substring(0, 2)).WithArguments("0").WithLocation(1, 1)
707
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$""""""hello""""""").WithArguments(suffix).WithLocation(1, 1)
730
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$@""""""hello""""""").WithArguments(suffix).WithLocation(1, 1)
800
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""
824
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""
846
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""
871
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"""""""
895
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$""""""
922
Diagnostic(ErrorCode.
ERR_UnexpectedToken
, @"$@""""""