Rename the existing StandardProperties struct to EmacsStandardProperties.
This commit is contained in:
parent
3fe56e9aa3
commit
f25246556c
@ -45,7 +45,7 @@ pub(crate) fn assert_bounds<'s, S: Source<'s>>(
|
|||||||
emacs: &'s Token<'s>,
|
emacs: &'s Token<'s>,
|
||||||
rust: &'s S,
|
rust: &'s S,
|
||||||
) -> Result<(), Box<dyn std::error::Error>> {
|
) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let standard_properties = get_standard_properties(emacs)?;
|
let standard_properties = get_emacs_standard_properties(emacs)?;
|
||||||
let (begin, end) = (
|
let (begin, end) = (
|
||||||
standard_properties
|
standard_properties
|
||||||
.begin
|
.begin
|
||||||
@ -63,7 +63,7 @@ pub(crate) fn assert_bounds<'s, S: Source<'s>>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StandardProperties {
|
struct EmacsStandardProperties {
|
||||||
begin: Option<usize>,
|
begin: Option<usize>,
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
post_affiliated: Option<usize>,
|
post_affiliated: Option<usize>,
|
||||||
@ -76,9 +76,9 @@ struct StandardProperties {
|
|||||||
post_blank: Option<usize>,
|
post_blank: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_standard_properties<'s>(
|
fn get_emacs_standard_properties<'s>(
|
||||||
emacs: &'s Token<'s>,
|
emacs: &'s Token<'s>,
|
||||||
) -> Result<StandardProperties, Box<dyn std::error::Error>> {
|
) -> Result<EmacsStandardProperties, Box<dyn std::error::Error>> {
|
||||||
let children = emacs.as_list()?;
|
let children = emacs.as_list()?;
|
||||||
let attributes_child = children
|
let attributes_child = children
|
||||||
.iter()
|
.iter()
|
||||||
@ -97,7 +97,7 @@ fn get_standard_properties<'s>(
|
|||||||
let contents_end = maybe_token_to_usize(std_props.next())?;
|
let contents_end = maybe_token_to_usize(std_props.next())?;
|
||||||
let end = maybe_token_to_usize(std_props.next())?;
|
let end = maybe_token_to_usize(std_props.next())?;
|
||||||
let post_blank = maybe_token_to_usize(std_props.next())?;
|
let post_blank = maybe_token_to_usize(std_props.next())?;
|
||||||
StandardProperties {
|
EmacsStandardProperties {
|
||||||
begin,
|
begin,
|
||||||
post_affiliated,
|
post_affiliated,
|
||||||
contents_begin,
|
contents_begin,
|
||||||
@ -116,7 +116,7 @@ fn get_standard_properties<'s>(
|
|||||||
maybe_token_to_usize(attributes_map.get(":post-blank").map(|token| *token))?;
|
maybe_token_to_usize(attributes_map.get(":post-blank").map(|token| *token))?;
|
||||||
let post_affiliated =
|
let post_affiliated =
|
||||||
maybe_token_to_usize(attributes_map.get(":post-affiliated").map(|token| *token))?;
|
maybe_token_to_usize(attributes_map.get(":post-affiliated").map(|token| *token))?;
|
||||||
StandardProperties {
|
EmacsStandardProperties {
|
||||||
begin,
|
begin,
|
||||||
post_affiliated,
|
post_affiliated,
|
||||||
contents_begin,
|
contents_begin,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user