mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-12 15:45:22 +00:00
Rename
This commit is contained in:
parent
9c99881b7e
commit
65739473c4
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ use crate::{
|
||||||
use std::{iter, mem, str};
|
use std::{iter, mem, str};
|
||||||
|
|
||||||
struct FStringParser<'a> {
|
struct FStringParser<'a> {
|
||||||
source: iter::Peekable<str::Chars<'a>>,
|
chars: iter::Peekable<str::Chars<'a>>,
|
||||||
str_start: Location,
|
str_start: Location,
|
||||||
str_end: Location,
|
str_end: Location,
|
||||||
}
|
}
|
||||||
|
@ -15,18 +15,18 @@ struct FStringParser<'a> {
|
||||||
impl<'a> FStringParser<'a> {
|
impl<'a> FStringParser<'a> {
|
||||||
fn new(source: &'a str, str_start: Location, str_end: Location) -> Self {
|
fn new(source: &'a str, str_start: Location, str_end: Location) -> Self {
|
||||||
Self {
|
Self {
|
||||||
source: source.chars().peekable(),
|
chars: source.chars().peekable(),
|
||||||
str_start,
|
str_start,
|
||||||
str_end,
|
str_end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next_char(&mut self) -> Option<char> {
|
fn next_char(&mut self) -> Option<char> {
|
||||||
self.source.next()
|
self.chars.next()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn peek(&mut self) -> Option<&char> {
|
fn peek(&mut self) -> Option<&char> {
|
||||||
self.source.peek()
|
self.chars.peek()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue