Trait swc_common::plugin::RuntimeImpl_trait::RuntimeImpl [−][src]
pub trait RuntimeImpl {
fn emit_diagnostic(&self, db: RVec<u8>);
fn fresh_mark(&self, parent: Mark) -> Mark;
fn parent_mark(&self, mar: Mark) -> Mark;
fn is_mark_builtin(&self, mark: Mark) -> bool;
fn set_mark_is_builtin(&self, mark: Mark, is_builtin: bool);
fn is_mark_descendant_of(&self, mark: Mark, ancestor: Mark) -> bool;
fn least_ancestor_of_marks(&self, a: Mark, b: Mark) -> Mark;
fn apply_mark_to_syntax_context_internal(
&self,
ctxt: SyntaxContext,
mark: Mark
) -> SyntaxContext;
fn remove_mark_of_syntax_context(&self, ctxt: &mut SyntaxContext) -> Mark;
fn outer_mark_of_syntax_context(&self, ctxt: SyntaxContext) -> Mark;
}
This is supported on crate features
plugin-rt
or plugin-mode
only.Expand description
INTERNAL API
Don’t use this. This is for internal use only. This can be changed without breaking semver version bump.
Required methods
fn emit_diagnostic(&self, db: RVec<u8>)
fn emit_diagnostic(&self, db: RVec<u8>)
Emit a structured diagnostic.
db
: Serialized version of Diagnostic which is serialized using bincode.