Update error messages to mention the invalid character.
Improve the diagnostic of floating point exponents.
Add tests for error messages when parsing floating point exponents.
Update existing tests for new error messages.
Rephrased error message to indicate which character is unexpected.
Provide error message variations when parsing binary, octal, decimal (default), and hexadecimal integer literals.
Look for unexpected digits in binary and octal integer literals.
Look for unexpected letters in hex integer literals.
Resolves: SR-5236 rdar://problem/32858684
It is apparently a common mistake for beginners to start the names of functions
etc. with numbers, and before this patch the diagnostic wasn't specific about
the problem. It seems likely that most instances of `func 1(...` will be
mistakes in this vein, so this patch specifically diagnoses that case, and also
parses the number as the identifier to avoid follow on errors about top-level
closures (from the {}) and other invalid syntax.
Fixes rdar://problem/32316666 .