pub struct Formatter {
pub html: bool,
/* private fields */
}Fields§
§html: boolImplementations§
Source§impl Formatter
impl Formatter
pub fn new() -> Formatter
pub fn format(&mut self, tree: &Program) -> String
pub fn reset_numbering(&mut self)
pub fn works_cited(&mut self) -> String
pub fn format_html( &mut self, tree: &Program, style: String, shim: String, ) -> String
pub fn table_of_contents(&mut self, toc: &TableOfContents) -> String
pub fn sections(&mut self, sections: &Vec<Section>) -> String
pub fn program(&mut self, node: &Program) -> String
pub fn title(&mut self, node: &Title) -> String
pub fn subtitle(&mut self, node: &Subtitle) -> String
pub fn body(&mut self, node: &Body) -> String
pub fn section(&mut self, node: &Section) -> String
pub fn paragraph(&mut self, node: &Paragraph) -> String
pub fn inline_paragraph(&mut self, node: &Paragraph) -> String
pub fn paragraph_element(&mut self, node: &ParagraphElement) -> String
pub fn fenced_mech_code(&mut self, block: &FencedMechCode) -> String
pub fn image(&mut self, node: &Image) -> String
pub fn abstract_el(&mut self, node: &Vec<Paragraph>) -> String
pub fn equation(&mut self, node: &Token) -> String
pub fn diagram(&mut self, node: &Token) -> String
pub fn citation(&mut self, node: &Citation) -> String
pub fn float( &mut self, node: &Box<SectionElement>, float_dir: &FloatDirection, ) -> String
pub fn info_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn question_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn success_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn warning_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn idea_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn error_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn section_element(&mut self, node: &SectionElement) -> String
pub fn section_error(&mut self, src: Token, range: &SourceRange) -> String
pub fn footnote(&mut self, node: &Footnote) -> String
pub fn quote_block(&mut self, node: &Vec<Paragraph>) -> String
pub fn thematic_break(&mut self) -> String
pub fn mechdown_table(&mut self, node: &MarkdownTable) -> String
pub fn mechdown_table_string(&mut self, node: &MarkdownTable) -> String
pub fn mechdown_table_html(&mut self, node: &MarkdownTable) -> String
pub fn grammar(&mut self, node: &Grammar) -> String
pub fn code_block(&mut self, node: &Token) -> String
pub fn comment(&mut self, node: &Comment) -> String
pub fn list(&mut self, node: &MDList) -> String
pub fn check_list(&mut self, node: &CheckList) -> String
pub fn ordered_list(&mut self, node: &OrderedList) -> String
pub fn unordered_list(&mut self, node: &UnorderedList) -> String
pub fn mech_code(&mut self, node: &Vec<(MechCode, Option<Comment>)>) -> String
pub fn fsm_implementation(&mut self, node: &FsmImplementation) -> String
pub fn fsm_arm(&mut self, node: &FsmArm, last: bool) -> String
pub fn guard(&mut self, node: &Guard) -> String
pub fn pattern(&mut self, node: &Pattern) -> String
pub fn pattern_tuple_struct(&mut self, node: &PatternTupleStruct) -> String
pub fn transition(&mut self, node: &Transition) -> String
pub fn fsm_specification(&mut self, node: &FsmSpecification) -> String
pub fn state_definition(&mut self, node: &StateDefinition) -> String
pub fn variable_define(&mut self, node: &VariableDefine) -> String
pub fn statement(&mut self, node: &Statement) -> String
pub fn kind_define(&mut self, node: &KindDefine) -> String
pub fn tuple_destructure(&mut self, node: &TupleDestructure) -> String
pub fn variable_assign(&mut self, node: &VariableAssign) -> String
pub fn op_assign(&mut self, node: &OpAssign) -> String
pub fn op_assign_op(&mut self, node: &OpAssignOp) -> String
pub fn slice_ref(&mut self, node: &SliceRef) -> String
pub fn expression(&mut self, node: &Expression) -> String
pub fn range_expression(&mut self, node: &RangeExpression) -> String
pub fn function_call(&mut self, node: &FunctionCall) -> String
pub fn argument(&mut self, node: &(Option<Identifier>, Expression)) -> String
pub fn slice(&mut self, node: &Slice) -> String
pub fn subscript(&mut self, node: &Subscript) -> String
pub fn brace(&mut self, node: &Vec<Subscript>) -> String
pub fn swizzle(&mut self, node: &Vec<Identifier>) -> String
pub fn dot_int(&mut self, node: &RealNumber) -> String
pub fn dot(&mut self, node: &Identifier) -> String
pub fn all(&mut self) -> String
pub fn bracket(&mut self, node: &Vec<Subscript>) -> String
pub fn structure(&mut self, node: &Structure) -> String
pub fn map(&mut self, node: &Map) -> String
pub fn mapping(&mut self, node: &Mapping) -> String
pub fn set(&mut self, node: &Set) -> String
pub fn tuple_struct(&mut self, node: &TupleStruct) -> String
pub fn table(&mut self, node: &Table) -> String
pub fn table_header(&mut self, node: &TableHeader) -> String
pub fn table_row(&mut self, node: &TableRow) -> String
pub fn table_column(&mut self, node: &TableColumn) -> String
pub fn field(&mut self, node: &Field) -> String
pub fn tuple(&mut self, node: &Tuple) -> String
pub fn record(&mut self, node: &Record) -> String
pub fn binding(&mut self, node: &Binding) -> String
pub fn matrix(&mut self, node: &Matrix) -> String
pub fn matrix_column_elements( &mut self, column_elements: &[&MatrixColumn], ) -> String
pub fn matrix_row(&mut self, node: &MatrixRow) -> String
pub fn matrix_column(&mut self, node: &MatrixColumn) -> String
pub fn var(&mut self, node: &Var) -> String
pub fn kind_annotation(&mut self, node: &Kind) -> String
pub fn kind(&mut self, node: &Kind) -> String
pub fn factor(&mut self, node: &Factor) -> String
pub fn term(&mut self, node: &Term) -> String
pub fn formula_operator(&mut self, node: &FormulaOperator) -> String
pub fn table_op(&mut self, node: &TableOp) -> String
pub fn set_op(&mut self, node: &SetOp) -> String
pub fn add_sub_op(&mut self, node: &AddSubOp) -> String
pub fn mul_div_op(&mut self, node: &MulDivOp) -> String
pub fn power_op(&mut self, node: &PowerOp) -> String
pub fn vec_op(&mut self, node: &VecOp) -> String
pub fn comparison_op(&mut self, node: &ComparisonOp) -> String
pub fn logic_op(&mut self, node: &LogicOp) -> String
pub fn boolean(&mut self, node: &Token) -> String
pub fn empty(&mut self, node: &Token) -> String
pub fn literal(&mut self, node: &Literal) -> String
pub fn atom(&mut self, node: &Atom) -> String
pub fn string(&mut self, node: &MechString) -> String
pub fn number(&mut self, node: &Number) -> String
pub fn real_number(&mut self, node: &RealNumber) -> String
pub fn complex_numer(&mut self, node: &C64Node) -> String
pub fn imaginary_number(&mut self, node: &ImaginaryNumber) -> String
pub fn humanize_html(input: String) -> String
Trait Implementations§
impl StructuralPartialEq for Formatter
Auto Trait Implementations§
impl Freeze for Formatter
impl RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl UnwindSafe for Formatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.