Add a toString method to CodeSnippet