INNER CODE UNIT · Python

CFormatter

wasm3/wasm3 · extra/format.py:176

class CFormatter:
    """The C and the headers: clang-format, with the wasm3 conventions put back.

    Everything the conventions are made of -- the patterns that recognise them, the
    columns they are kept in, the passes that hide them from clang-format and restore
    them -- belongs to this class and to nothing else. See the module docstring for
    what the three of them are and why clang-format cannot express them.
    """

    NAME = "clang-format"
    SUFFIXES = (".c", ".h")
    MAJOR = 23  # the release the tree is formatted with; see the module docstring

    CONFIG = os.path.join(ROOT, ".clang-format")

    # Settings some files want on top of .clang-format: `style` is merged over the
    # shared config for any path `files` matches. A header is mostly one declaration
    # table, with the comment on each entry and the blank line between groups part of

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…