Skip to content

Commit cf63112

Browse files
authored
Fix hexadecimal numbers always prefixed with 0x
If a number was just "42", it will be treated as 0x42. This commit fixes it so 0x hexadecimal prefixes are not emitted if they're explicitly omitted.
1 parent d62b045 commit cf63112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ILSourceParser/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ internal static Parser<char> ParseHexChar()
521521
internal static Parser<string> ParseHexNumber()
522522
{
523523
return (
524-
from prefix in ParseHexPrefix()
524+
from prefix in Parse.String("0x")
525525
from numbers in ParseHexChar().AtLeastOnce().Text()
526526
select $"0x{numbers}"
527527
)

0 commit comments

Comments
 (0)