You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often, when dealing with FloatLiteralExprSyntax or IntegerLiteralExprSyntax, you want to get the value they represent. SwiftSyntax should provide computed properties that return these.
The catch with it is, that we need to support all kinds of literals that are supported in Swift. In addition to the obvious ones this includes:
Literals with underscores
Hexadecimal int literals
Octal int literals
Binary int literals
Exponential float literals (e.g. 5e+2)
Hexadecimal float literals with possible exponents (e.g. 0x5.fp+2)
#148 started implementing these but gave up on the less obvious literals.
The text was updated successfully, but these errors were encountered:
After corresponding with @ahoppen and performing some exploratory work here, I have assigned myself this story. I intend to raise a PR when development is complete.
Additional Detail from JIRA
md5: b8b8d3a1a602fe052d3a131ced13afd6
Issue Description:
Often, when dealing with
FloatLiteralExprSyntax
orIntegerLiteralExprSyntax
, you want to get the value they represent. SwiftSyntax should provide computed properties that return these.The catch with it is, that we need to support all kinds of literals that are supported in Swift. In addition to the obvious ones this includes:
Literals with underscores
Hexadecimal int literals
Octal int literals
Binary int literals
Exponential float literals (e.g.
5e+2
)Hexadecimal float literals with possible exponents (e.g.
0x5.fp+2
)#148 started implementing these but gave up on the less obvious literals.
The text was updated successfully, but these errors were encountered: