/// Adds a standalone line comment to the current container, or adds an end-of-line comment
/// to the current container's current value.
///
/// # Arguments
///   * `captured`: the line comment content (including leading spaces)
///   * `pending_new_line_comment_block` - If true and the comment is not an
///     end-of-line comment, the container should insert a line_comment_break before inserting
///     the next line comment. This should only be true if this standalone line comment was
///     preceded by one or more standalone line comments and one or more blank lines.
///
/// # Returns
///   true if the line comment is standalone, that is, not an end-of-line comment
Adds a standalone line comment to the current container, or adds an end-of-line comment
to the current container's current value.
Adds a standalone line comment to the current container or adds an end - of - line comment to the current container ' s current value .
fn add_line_comment(
        &self,
        captured: Option<&str>,
        pending_new_line_comment_block: bool,
    ) -> Result<bool, Error> {
        match captured {
            Some(content) => {
                let content = content.trim_end();
                self.with_container(|container| {
                    container.add_line_comment(
                        content,
                        self.column_number,
                        pending_new_line_comment_block,
                    )
                })
            }
            None => Err(Error::internal(
                self.location(),
                "Line comment regex should support empty line comment",
            )),
        }
    }
fn add_line_comment ( & self , captured : Option < & str > , pending_new_line_comment_block : bool , ) -> Result < bool , Error > { match captured { Some ( content ) => { let content = content . trim_end ( ) ; self . with_container ( | container | { container . add_line_comment ( content , self . column_number , pending_new_line_comment_block , ) } ) } None => Err ( Error :: internal ( self . location ( ) , " " , ) ) , } }
Adds a standalone line comment to the current container, or adds an end-of-line comment
to the current container's current value.
Adds a standalone line comment to the current container or adds an end - of - line comment to the current container ' s current value .
true if the line comment is standalone, that is, not an end-of-line comment
true if the line comment is standalone that is not an end - of - line comment
&self
captured
Option<&str>
pending_new_line_comment_block
bool