Develop comprehensive tests for grammar, lexer, parser, and formatter
Write comprehensive tests for each component of the language's infrastructure to ensure their correct functionality. This includes tests for the language grammar, the lexer, the parser, and the formatter. For each component, the tests should:
Validate the component against various code samples.
Ensure edge cases are correctly handled.
Confirm proper handling and preservation of comments during the formatting process.