Struct WithComments

pub struct WithComments { pub ast: Ast, pub comments: Vec<Comment> }

An abstract syntax tree for a singular expression along with comments found.

Comments are not stored in the tree itself to avoid complexity. Each comment contains a span of precisely where it occurred in the original regular expression.

Fields

ast: Ast

The actual ast.

comments: Vec<Comment>

All comments found in the original regular expression.

Trait Implementations

impl Clone for WithComments

fn clone(&self) -> Self

impl Debug for WithComments

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for WithComments

impl PartialEq for WithComments

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for WithComments

Auto Trait Implementations

impl Freeze for WithComments

impl RefUnwindSafe for WithComments

impl Send for WithComments

impl Sync for WithComments

impl Unpin for WithComments

impl UnsafeUnpin for WithComments

impl UnwindSafe for WithComments

Blanket Implementations

impl<T> Any for WithComments where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for WithComments where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for WithComments where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for WithComments where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for WithComments

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for WithComments where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for WithComments where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for WithComments where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for WithComments where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>