Skip to content

Commit

Permalink
s/RawBinaryEExpression_1_1/BinaryEExpression_1_1/
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Jul 9, 2024
1 parent edcc3f0 commit 1ca6a53
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions src/lazy/any_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::lazy::binary::raw::sequence::{
LazyRawBinaryList_1_0, LazyRawBinarySExp_1_0, RawBinarySequenceIterator_1_0,
};
use crate::lazy::binary::raw::v1_1::e_expression::{
BinaryEExpArgGroup, BinaryEExpArgGroupIterator, RawBinaryEExpression_1_1,
BinaryEExpArgGroup, BinaryEExpArgGroupIterator, BinaryEExpression_1_1,
};
use crate::lazy::binary::raw::v1_1::r#struct::{
LazyRawBinaryFieldName_1_1, LazyRawBinaryStruct_1_1, RawBinaryStructIterator_1_1,
Expand Down Expand Up @@ -192,7 +192,7 @@ pub struct LazyRawAnyEExpression<'top> {
#[derive(Debug, Copy, Clone)]
pub enum LazyRawAnyEExpressionKind<'top> {
Text_1_1(TextEExpression_1_1<'top>),
Binary_1_1(&'top RawBinaryEExpression_1_1<'top>),
Binary_1_1(&'top BinaryEExpression_1_1<'top>),
}

impl<'top> LazyRawAnyEExpression<'top> {
Expand All @@ -212,8 +212,8 @@ impl<'top> From<TextEExpression_1_1<'top>> for LazyRawAnyEExpression<'top> {
}
}
}
impl<'top> From<&'top RawBinaryEExpression_1_1<'top>> for LazyRawAnyEExpression<'top> {
fn from(binary_invocation: &'top RawBinaryEExpression_1_1<'top>) -> Self {
impl<'top> From<&'top BinaryEExpression_1_1<'top>> for LazyRawAnyEExpression<'top> {
fn from(binary_invocation: &'top BinaryEExpression_1_1<'top>) -> Self {
LazyRawAnyEExpression {
encoding: LazyRawAnyEExpressionKind::Binary_1_1(binary_invocation),
}
Expand Down Expand Up @@ -373,7 +373,7 @@ pub enum LazyRawAnyEExpArgsIteratorKind<'top> {
>>::RawArgumentsIterator,
),
Binary_1_1(
<&'top RawBinaryEExpression_1_1<'top> as RawEExpression<
<&'top BinaryEExpression_1_1<'top> as RawEExpression<
'top,
BinaryEncoding_1_1,
>>::RawArgumentsIterator,
Expand Down
12 changes: 6 additions & 6 deletions src/lazy/binary/raw/v1_1/e_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl BinaryEExpHeader {
}

#[derive(Copy, Clone)]
pub struct RawBinaryEExpression_1_1<'top> {
pub struct BinaryEExpression_1_1<'top> {
// The arguments to the e-expression are parsed either:
//
// 1. when the e-expression is first encountered, if it is not length-prefixed.
Expand Down Expand Up @@ -75,7 +75,7 @@ pub struct RawBinaryEExpression_1_1<'top> {
pub(crate) input: ImmutableBuffer<'top>,
}

impl<'top> RawBinaryEExpression_1_1<'top> {
impl<'top> BinaryEExpression_1_1<'top> {
pub fn new(
macro_ref: MacroRef<'top>,
bitmap_bits: u64,
Expand All @@ -102,25 +102,25 @@ impl<'top> RawBinaryEExpression_1_1<'top> {
}
}

impl<'top> HasSpan<'top> for &'top RawBinaryEExpression_1_1<'top> {
impl<'top> HasSpan<'top> for &'top BinaryEExpression_1_1<'top> {
fn span(&self) -> Span<'top> {
Span::with_offset(self.input.offset(), self.input.bytes())
}
}

impl<'top> HasRange for &'top RawBinaryEExpression_1_1<'top> {
impl<'top> HasRange for &'top BinaryEExpression_1_1<'top> {
fn range(&self) -> Range<usize> {
self.input.range()
}
}

impl<'top> Debug for &'top RawBinaryEExpression_1_1<'top> {
impl<'top> Debug for &'top BinaryEExpression_1_1<'top> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "<e-expression invoking id '{}'>", self.id())
}
}

impl<'top> RawEExpression<'top, v1_1::Binary> for &'top RawBinaryEExpression_1_1<'top> {
impl<'top> RawEExpression<'top, v1_1::Binary> for &'top BinaryEExpression_1_1<'top> {
type RawArgumentsIterator = BinaryEExpArgsIterator_1_1<'top>;
type ArgGroup = BinaryEExpArgGroup<'top>;

Expand Down
14 changes: 7 additions & 7 deletions src/lazy/binary/raw/v1_1/immutable_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bumpalo::collections::Vec as BumpVec;
use crate::binary::constants::v1_1::IVM;
use crate::lazy::binary::encoded_value::EncodedValue;
use crate::lazy::binary::raw::v1_1::e_expression::{
BinaryEExpArgsIterator_1_1, RawBinaryEExpression_1_1,
BinaryEExpArgsIterator_1_1, BinaryEExpression_1_1,
};
use crate::lazy::binary::raw::v1_1::value::{
LazyRawBinaryValue_1_1, LazyRawBinaryVersionMarker_1_1,
Expand Down Expand Up @@ -346,7 +346,7 @@ impl<'a> ImmutableBuffer<'a> {
// Like RawValueExpr, but doesn't use references.
enum ParseValueExprResult<'top> {
Value(ParseResult<'top, LazyRawBinaryValue_1_1<'top>>),
EExp(ParseResult<'top, RawBinaryEExpression_1_1<'top>>),
EExp(ParseResult<'top, BinaryEExpression_1_1<'top>>),
}

use OpcodeType::*;
Expand Down Expand Up @@ -579,7 +579,7 @@ impl<'a> ImmutableBuffer<'a> {
pub fn read_e_expression(
self,
opcode: Opcode,
) -> ParseResult<'a, RawBinaryEExpression_1_1<'a>> {
) -> ParseResult<'a, BinaryEExpression_1_1<'a>> {
use OpcodeType::*;
match opcode.opcode_type {
EExpressionWithAddress => return self.read_eexp_with_address_in_opcode(opcode),
Expand All @@ -592,7 +592,7 @@ impl<'a> ImmutableBuffer<'a> {
fn read_eexp_with_address_in_opcode(
self,
opcode: Opcode,
) -> ParseResult<'a, RawBinaryEExpression_1_1<'a>> {
) -> ParseResult<'a, BinaryEExpression_1_1<'a>> {
let input_after_opcode = self.consume(1);
let macro_address = opcode.byte as usize;

Expand Down Expand Up @@ -639,7 +639,7 @@ impl<'a> ImmutableBuffer<'a> {
let args_offset = input_after_bitmap.offset() - self.offset();
Ok((
{
RawBinaryEExpression_1_1::new(
BinaryEExpression_1_1::new(
MacroRef::new(macro_address, macro_ref),
bitmap_bits,
matched_eexp_bytes,
Expand All @@ -655,7 +655,7 @@ impl<'a> ImmutableBuffer<'a> {
fn read_eexp_with_length_prefix(
self,
_opcode: Opcode,
) -> ParseResult<'a, RawBinaryEExpression_1_1<'a>> {
) -> ParseResult<'a, BinaryEExpression_1_1<'a>> {
let input_after_opcode = self.consume(1);
let (macro_address_flex_uint, input_after_address) = input_after_opcode.read_flex_uint()?;
let (args_length_flex_uint, input_after_length) = input_after_address.read_flex_uint()?;
Expand All @@ -682,7 +682,7 @@ impl<'a> ImmutableBuffer<'a> {
let args_offset = bitmap_offset + macro_ref.signature().bitmap_size_in_bytes() as u8;
let remaining_input = self.consume(total_length);
return Ok((
RawBinaryEExpression_1_1::new(
BinaryEExpression_1_1::new(
MacroRef::new(macro_address, macro_ref),
bitmap_bits,
matched_bytes,
Expand Down
4 changes: 2 additions & 2 deletions src/lazy/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::lazy::text::value::{
LazyRawTextVersionMarker_1_1, RawTextAnnotationsIterator,
};

use crate::lazy::binary::raw::v1_1::e_expression::RawBinaryEExpression_1_1;
use crate::lazy::binary::raw::v1_1::e_expression::BinaryEExpression_1_1;
use crate::{IonResult, TextFormat, WriteConfig};

/// Marker trait for types that represent an Ion encoding.
Expand Down Expand Up @@ -272,7 +272,7 @@ impl Decoder for BinaryEncoding_1_1 {
type Struct<'top> = LazyRawBinaryStruct_1_1<'top>;
type FieldName<'top> = LazyRawBinaryFieldName_1_1<'top>;
type AnnotationsIterator<'top> = RawBinaryAnnotationsIterator_1_1<'top>;
type EExp<'top> = &'top RawBinaryEExpression_1_1<'top>;
type EExp<'top> = &'top BinaryEExpression_1_1<'top>;
type VersionMarker<'top> = LazyRawBinaryVersionMarker_1_1<'top>;
}

Expand Down

0 comments on commit 1ca6a53

Please sign in to comment.