Open
Description
For some content I'm working on it would be nice if int.parse
and int.tryParse
natively supported parsing binary integers prefixed with 0b
similar to how it handles hexadecimal 0x
ones currently.
Implementing this work now would also simplify the implementation of binary integer literals in the future as included in the considered small and useful features list documented in the language repo. The CFE/analyzer currently use the method for their conversion of the literals to consistent decimal values.
Analyzer:
https://cs.opensource.google/dart/sdk/+/master:pkg/analyzer/tool/summary/mini_ast.dart;l=478
https://cs.opensource.google/dart/sdk/+/master:pkg/analyzer/lib/src/fasta/ast_builder.dart;l=2972