Enum swc_ecma_ast::StrKind [−][src]
pub enum StrKind {
Normal {
contains_quote: bool,
},
Synthesized,
}
Expand description
THis enum determines how string literal should be printed.
Variants
Span of string points to original source code, and codegen should use it. Note: Giving wrong value to this field will result in invalid codegen.
Fields of Normal
contains_quote: bool
Does span of this string literal contains quote?
True for string literals generated by parser, false for string literals generated by various passes.
If the span of string does not point a string literal, mainly because this string is synthesized, this variant should be used.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Always returns true as this is not a data of a string literal.
Auto Trait Implementations
impl RefUnwindSafe for StrKind
impl UnwindSafe for StrKind
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more