Struct ecmascript::ast::TemplateElement[][src]

pub struct TemplateElement {
    pub cooked: Option<String>,
    pub raw: String,
    pub loc: Option<SourceLocation>,
}

TemplateElement is any text between interpolated expressions inside a template literal. eg. abc ${} \u{2028} "abc " and " \u{2028}" would be the TemplateElements for this template literal. Reference

Fields

If the template element has any sort of escape sequences (eg. \u{2028}) this will represent the evaluated result of that sequence. eg. if raw == "\u{41}", cooked = "A"

This will store the exact string value, before being evaluted into the unicode code points.

This is the source location of the template element

Trait Implementations

impl Debug for TemplateElement
[src]

Formats the value using the given formatter. Read more

impl Clone for TemplateElement
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for TemplateElement
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations