fix(fstring): use x/X for hexadecimal instead of h/H
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
let a = 42
|
||||
print(f"int: {a:d}; hex: {a:h}; HEX: {a:H}; oct: {a:o}; bin: {a:b}")
|
||||
print(f"int: {a:d}; hex: {a:x}; HEX: {a:X}; oct: {a:o}; bin: {a:b}")
|
||||
let b = 1234567890
|
||||
print(f"{b:,}")
|
||||
print(f"{b:_}")
|
||||
|
||||
@@ -95,7 +95,7 @@ class FormatSpecLexer:
|
||||
self.add_token(TokenType.T_DEC)
|
||||
case "o":
|
||||
self.add_token(TokenType.T_OCT)
|
||||
case "h" | "H":
|
||||
case "x" | "X":
|
||||
self.add_token(TokenType.T_HEX)
|
||||
case "e":
|
||||
self.add_token(TokenType.T_SCI)
|
||||
|
||||
Reference in New Issue
Block a user