135 references to ERR_UnexpectedCharacter
Microsoft.CodeAnalysis.CSharp (7)
Errors\ErrorFacts.cs (1)
1177
or ErrorCode.
ERR_UnexpectedCharacter
Parser\Lexer.cs (5)
746
this.AddError(ErrorCode.
ERR_UnexpectedCharacter
, messageText);
1973
this.AddError(TextWindow.Position, width: 1, ErrorCode.
ERR_UnexpectedCharacter
, '@');
3740
this.AddCrefError(ErrorCode.
ERR_UnexpectedCharacter
, ".");
3886
this.AddCrefError(ErrorCode.
ERR_UnexpectedCharacter
, info.Text);
3897
this.AddCrefError(ErrorCode.
ERR_UnexpectedCharacter
, info.Text);
Parser\Lexer_StringLiteral.cs (1)
982
_lexer.TextWindow.Position, 1, ErrorCode.
ERR_UnexpectedCharacter
, ch));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\InterpolationTests.cs (1)
438
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "{").WithArguments("{").WithLocation(6, 33)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\SymbolErrorTests.cs (2)
21568
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\u0060").WithLocation(3, 7),
21595
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\u007c").WithLocation(3, 7),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (125)
LexicalAndXml\LexicalErrorTests.cs (20)
141
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(1, 1),
174
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(3, 18),
207
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(3, 19),
243
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(3, 18),
537
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "@").WithArguments("@").WithLocation(10, 1),
560
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "@").WithArguments("@").WithLocation(5, 20),
682
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\"),
685
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u070F"),
706
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u005C").WithLocation(1, 8));
722
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u0060"));
745
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\ud86d").WithLocation(6, 13),
774
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\udce7").WithLocation(6, 13),
803
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("𫓧").WithLocation(6, 13),
838
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(6, 13 + i));
844
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"𫓧").WithLocation(6, 213));
850
descriptions.Add(Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"𫓧 = 1;\n }\n}").WithLocation(6, 215));
854
descriptions.Add(Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"𫓧 = 1;\r\n }\r\n}").WithLocation(6, 215));
884
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "@").WithArguments("@").WithLocation(1, 1));
897
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "@").WithArguments("@").WithLocation(1, 4),
958
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u0303"));
LexicalAndXml\LexicalTests.cs (8)
275
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1));
299
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1));
323
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1));
343
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1),
365
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1),
387
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1),
432
TestBase.Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("@").WithLocation(1, 1));
1604
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, errors[0].Code);
Parsing\ExpressionParsingTests.cs (2)
6606
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(7, 34),
6612
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(7, 36),
Parsing\MemberDeclarationParsingTests.cs (1)
12014
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("\\").WithLocation(5, 11),
Parsing\ParserErrorMessageTests.cs (6)
2050
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u0"),
2056
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u00"),
2062
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u000"),
2071
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u0"),
2077
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u00"),
2083
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u000"),
Parsing\ParsingErrorRecoveryTests.cs (81)
245
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
354
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
369
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
385
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
416
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
434
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
).WithArguments("$"),
517
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
531
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
574
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
613
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
628
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
769
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
930
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
944
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
959
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
974
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1245
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[3].Code);
1261
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[2].Code);
1276
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1290
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
1305
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1320
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1334
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
1349
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1593
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1612
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
1632
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1794
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
1812
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
1829
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
1848
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[2].Code);
2145
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2150
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("$").WithLocation(1, 21),
2177
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
2194
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2213
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[2].Code);
2613
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2628
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
2642
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2658
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[2].Code);
2672
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2686
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2700
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2714
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2728
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2742
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2756
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2772
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
2875
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2892
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2909
Assert.Equal(ErrorCode.
ERR_UnexpectedCharacter
, (ErrorCode)file.Errors()[1].Code); //didn't expect '$'
2926
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2942
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
2958
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3255
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3276
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3297
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3318
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3339
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3360
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3381
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3405
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3428
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3451
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3475
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
3737
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3761
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3785
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
3810
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
4901
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
4928
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
4955
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
4983
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
5010
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
5037
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
6023
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
6050
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
6077
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
6105
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[1].Code);
6132
Assert.Equal((int)ErrorCode.
ERR_UnexpectedCharacter
, file.Errors()[0].Code);
6162
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("$").WithLocation(1, 45));
Parsing\RawInterpolatedStringLiteralCompilingTests.cs (4)
688
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("#").WithLocation(5, 1),
691
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("#").WithLocation(7, 1));
717
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("#").WithLocation(5, 1),
720
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("#").WithLocation(7, 1));
Parsing\RawInterpolatedStringLiteralParsingTests.cs (1)
1729
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments("$").WithLocation(6, 17));
Parsing\ScriptParsingTests.cs (1)
9465
new ErrorDescription { Code = (int)ErrorCode.
ERR_UnexpectedCharacter
, Line = 2, Column = 3 });
Parsing\TopLevelStatementsParsingTests.cs (1)
338
Diagnostic(ErrorCode.
ERR_UnexpectedCharacter
, "").WithArguments(@"\u005C").WithLocation(1, 8)