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