Skip to content

Separate Syntax Highlighting Class for Modularity #26

Closed
@chrisdedman

Description

@chrisdedman

Descritpion

Currently, the syntax highlighting functionality is implemented in a single class. This monolithic approach makes it difficult to maintain and extend the syntax highlighting features for different programming languages.

We propose separating the syntax highlighting class into individual classes for each supported language to improve modularity and maintainability. This will allow for:

  • Better Organization
  • Easier Maintenance
  • Extensibility

Tasks

  • Create a Base Class: Contains common methods and properties for syntax highlighting.
  • Create Language-Specific Classes: Implement language-specific classes (e.g., SyntaxPython, SyntaxCpp) that inherit from the base class and override methods as needed.
  • Factory Pattern: Use a factory pattern to instantiate the appropriate syntax highlighter based on the language detected in the code (based on file extension).
  • Provide documentation on the process of adding new syntax extensions (in the wiki).
  • Create Unit Tests: Test syntax components

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions