Skip to content

topmark.processors.builtins.slash

topmark / processors / builtins / slash

Header processor for C-style comment formats.

This processor supports files using // line comments (and ecosystems that also allow /* ... */ block comments). It is intended for JSON-with-comments (JSONC) files such as VS Code settings/extensions. We emit a header as // lines to avoid interfering with tools that might not fully accept block comments.

SlashHeaderProcessor

SlashHeaderProcessor()

Bases: LineCommentMixin, HeaderProcessor

Processor for files that accept C-style comments.

We render the header as //-prefixed lines. Shebang handling is disabled.

Source code in src/topmark/processors/builtins/slash.py
def __init__(self) -> None:
    # Rely on the class attribute for LineCommentMixin; just run base init.
    super().__init__()