Trait biome_formatter::CstFormatContext
source · pub trait CstFormatContext: FormatContext {
type Language: Language;
type Style: CommentStyle<Language = Self::Language>;
type CommentRule: FormatRule<SourceComment<Self::Language>, Context = Self> + Default;
// Required method
fn comments(&self) -> &Comments<Self::Language>;
}
Expand description
The CstFormatContext is an extension of the CST unaware FormatContext and must be implemented by every language.
The context customizes the comments formatting and stores the comments of the CST.
Required Associated Types§
type Language: Language
type Style: CommentStyle<Language = Self::Language>
sourcetype CommentRule: FormatRule<SourceComment<Self::Language>, Context = Self> + Default
type CommentRule: FormatRule<SourceComment<Self::Language>, Context = Self> + Default
Rule for formatting comments.
Required Methods§
Object Safety§
This trait is not object safe.