Skip to main content

Printer

Struct Printer 

Source
pub struct Printer<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Printer<'a>

Source

pub fn advance<P: IntoPosition>(&mut self, new_pos: P)

Source§

impl<'a> Printer<'a>

Source

pub fn advance_before(&mut self, new_pos: Position, token_length: u32)

Source§

impl<'a> Printer<'a>

Source§

impl<'a> Printer<'a>

Source

pub fn maybe_advance_and_write( &mut self, pos: &Position, s: &str, always_write: bool, )

Source§

impl<'a> Printer<'a>

Source

pub fn new(writer: &'a mut dyn Writer, cst_node_map: CstNodeMap) -> Self

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_attribute(&mut self, attribute: &mut AstAttr)

Source§

impl<'a> Printer<'a>

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_block_ast_stat<S: IntoAstStatMut>(&mut self, stat: S)

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_else_if(&mut self, elseif: &mut AstStatIf)

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_else_if_expr(&mut self, elseif: &mut AstExprIfElse)

Source§

impl<'a> Printer<'a>

Source§

impl<'a> Printer<'a>

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_named_type_list( &mut self, list: &AstTypeList, unconditionally_parenthesize: bool, open_parentheses_position: Position, close_parentheses_position: Position, comma_positions: &AstArray<Position>, arg_names: &AstArray<Option<AstArgumentName>>, arg_names_colon_positions: &AstArray<Position>, )

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_ast_local_position( &mut self, local: &AstLocal, colon_position: Position, )

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_ast_expr<E: IntoAstExprMut>(&mut self, expr: E)

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_ast_stat<S: IntoAstStatPrinter>(&mut self, program: S)

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_type_annotation<T: IntoAstTypeMut>( &mut self, type_annotation: T, )

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_type_list( &mut self, list: &AstTypeList, unconditionally_parenthesize: bool, open_parentheses_position: Position, close_parentheses_position: Position, comma_positions: AstArray<Position>, )

Source§

impl<'a> Printer<'a>

Source

pub fn visualize_type_pack_annotation( &mut self, annotation: &mut AstTypePack, for_var_arg: bool, unconditionally_parenthesize: bool, for_function_return: bool, )

Source§

impl<'a> Printer<'a>

Source

pub fn write_end(&mut self, loc: &Location)

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Printer<'a>

§

impl<'a> !Send for Printer<'a>

§

impl<'a> !Sync for Printer<'a>

§

impl<'a> !UnwindSafe for Printer<'a>

§

impl<'a> Freeze for Printer<'a>

§

impl<'a> Unpin for Printer<'a>

§

impl<'a> UnsafeUnpin for Printer<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.