Struct yash_syntax::syntax::HereDoc
source · [−]Expand description
Here-document.
Fields
delimiter: Word
Token that marks the end of the content of the here-document.
remove_tabs: bool
Whether leading tab characters should be removed from each line of the
here-document content. This value is true
for the <<-
operator and
false
for <<
.
content: RefCell<Text>
Content of the here-document.
The content ends with a newline unless it is empty. If the delimiter is quoted, the content must be all literal.
This value is wrapped in RefCell
because the here-doc content is
parsed separately from the here-doc operator. When the operator is
parsed, the HereDoc
instance is created with an empty value. The value
is filled when the content is parsed later.
Trait Implementations
impl Eq for HereDoc
impl StructuralEq for HereDoc
impl StructuralPartialEq for HereDoc
Auto Trait Implementations
impl !RefUnwindSafe for HereDoc
impl !Send for HereDoc
impl !Sync for HereDoc
impl Unpin for HereDoc
impl !UnwindSafe for HereDoc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more