mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-04 02:39:22 +00:00
change function name
This commit is contained in:
parent
cfb9c937be
commit
50638bd06e
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ pub fn parse_str(literal: &str) -> Option<f64> {
|
||||||
parse_inner(literal.trim().as_bytes())
|
parse_inner(literal.trim().as_bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn strip_separators(literal: &[u8]) -> Option<Vec<u8>>{
|
fn strip_underlines(literal: &[u8]) -> Option<Vec<u8>>{
|
||||||
let mut prev = b'\0';
|
let mut prev = b'\0';
|
||||||
let mut dup = Vec::<u8>::new();
|
let mut dup = Vec::<u8>::new();
|
||||||
for p in literal {
|
for p in literal {
|
||||||
|
@ -58,7 +58,7 @@ fn parse_inner(literal: &[u8]) -> Option<f64> {
|
||||||
|
|
||||||
// Use custom function for underline handling for now.
|
// Use custom function for underline handling for now.
|
||||||
// For further information see https://github.com/Alexhuszagh/rust-lexical/issues/96.
|
// For further information see https://github.com/Alexhuszagh/rust-lexical/issues/96.
|
||||||
let stripped = strip_separators(literal)?;
|
let stripped = strip_underlines(literal)?;
|
||||||
|
|
||||||
// lexical-core's format::PYTHON_STRING is inaccurate
|
// lexical-core's format::PYTHON_STRING is inaccurate
|
||||||
const PYTHON_STRING: u128 = NumberFormatBuilder::rebuild(PYTHON3_LITERAL)
|
const PYTHON_STRING: u128 = NumberFormatBuilder::rebuild(PYTHON3_LITERAL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue