Add an indented line.
(&mut self, contents: impl AsRef<str>)
| 132 | |
| 133 | /// Add an indented line. |
| 134 | pub fn line(&mut self, contents: impl AsRef<str>) { |
| 135 | let indented_line = format!("{}{}\n", self.get_indent(), contents.as_ref()); |
| 136 | self.lines.push(indented_line); |
| 137 | } |
| 138 | |
| 139 | /// Add an indented lin with a given a `location` appended as a comment to |
| 140 | /// the line (this is useful for identifying where a line was generated). |