mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
Improve error locations when lexing number literals
This commit is contained in:
parent
924ba452eb
commit
a78abc4328
2 changed files with 19 additions and 14 deletions
|
@ -1,13 +1,16 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/lexer23465.d(19): Error: character 0x1f37a is not allowed as a continue character in an identifier
|
||||
fail_compilation/lexer23465.d(19): Error: character 0x1f37a is not a valid token
|
||||
fail_compilation/lexer23465.d(20): Error: character '\' is not a valid token
|
||||
fail_compilation/lexer23465.d(21): Error: unterminated /+ +/ comment
|
||||
fail_compilation/lexer23465.d(22): Error: found `End of File` instead of array initializer
|
||||
fail_compilation/lexer23465.d(22): Error: semicolon needed to end declaration of `arr`, instead of `End of File`
|
||||
fail_compilation/lexer23465.d(17): `arr` declared here
|
||||
fail_compilation/lexer23465.d(22): Error: character 0x1f37a is not allowed as a continue character in an identifier
|
||||
fail_compilation/lexer23465.d(22): Error: character 0x1f37a is not a valid token
|
||||
fail_compilation/lexer23465.d(23): Error: character '\' is not a valid token
|
||||
fail_compilation/lexer23465.d(24): Error: octal digit expected, not `9`
|
||||
fail_compilation/lexer23465.d(24): Error: octal literals larger than 7 are no longer supported
|
||||
fail_compilation/lexer23465.d(25): Error: integer overflow
|
||||
fail_compilation/lexer23465.d(26): Error: unterminated /+ +/ comment
|
||||
fail_compilation/lexer23465.d(27): Error: found `End of File` instead of array initializer
|
||||
fail_compilation/lexer23465.d(27): Error: semicolon needed to end declaration of `arr`, instead of `End of File`
|
||||
fail_compilation/lexer23465.d(20): `arr` declared here
|
||||
---
|
||||
*/
|
||||
|
||||
|
@ -18,4 +21,6 @@ int[] arr = [
|
|||
0,
|
||||
x🍺,
|
||||
3\,
|
||||
09,
|
||||
9999999999999999999999,
|
||||
5, /+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue