Sets the snippet of code near the error.
public function setSnippet(string $snippet) : void { $this->snippet = $snippet; $this->updateRepr(); }