Struct yash_syntax::syntax::HereDoc
source · pub struct HereDoc {
pub delimiter: Word,
pub remove_tabs: bool,
pub content: RefCell<Text>,
}
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. If remove_tabs
is true
,
each content line does not start with tabs as they are removed when
parsed.
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§
source§impl PartialEq<HereDoc> for HereDoc
impl PartialEq<HereDoc> for HereDoc
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more