<commit_before>filetype: c

detect:
    filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"

rules:
    - identifier: "\\b[A-Z_][0-9A-Z_]+\\b" 
    - type: "\\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\\b"
    - type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
    - type.extended: "\\b(bool)\\b"
    - statement: "\\b(typename|mutable|volatile|register|explicit)\\b"
    - statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
    - statement: "\\b(try|throw|catch|operator|new|delete)\\b"
    - statement: "\\b(goto|continue|break|return)\\b"
    - preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
    - constant: "'([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'"
    - constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
    - constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
      # GCC builtins
    - statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
    - statement: "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
      # Operator Color
    - symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)" 
    - symbol.brackets: "[(){}]|\\[|\\]"
    - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
    - constant.number: "NULL"

    - constant.string:
        start: "\""
        end: "\""
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."

    - constant.string:
        start: "'"<commit_msg>Remove `new` keyword from C syntax<commit_after>filetype: c

detect:
    filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"

rules:
    - identifier: "\\b[A-Z_][0-9A-Z_]+\\b" 
    - type: "\\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\\b"
    - type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
    - type.extended: "\\b(bool)\\b"
    - statement: "\\b(typename|mutable|volatile|register|explicit)\\b"
    - statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
    - statement: "\\b(try|throw|catch|operator|delete)\\b"
    - statement: "\\b(goto|continue|break|return)\\b"
    - preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
    - constant: "'([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'"
    - constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
    - constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
      # GCC builtins
    - statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
    - statement: "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
      # Operator Color
    - symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)" 
    - symbol.brackets: "[(){}]|\\[|\\]"
    - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
    - constant.number: "NULL"

    - constant.string:
        start: "\""
        end: "\""
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."

    - constant.string:
        start: "'"
{'fraction_non_alphanumeric': 0.3098065829657279, 'fraction_numerical': 0.016287750254496098, 'mean_word_length': 2.868766404199475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1165058', 'n_tokens_mistral': 1250, 'n_tokens_neox': 1183, 'n_words': 109}