<commit_before>(require 'cc-mode)

(eval-when-compile
  (require 'cc-langs)
  (require 'cc-fonts))

(eval-and-compile
  (c-add-language 'okl-mode 'objc-mode))

(c-lang-defconst c-primitive-type-kwds
  "Primitives"
  okl (append
       (append (c-lang-const c-primitive-type-kwds) nil)
       '("bool2"   "bool3"   "bool4"
         "char2"   "char3"   "char4"
         "short2"  "short3"  "short4"
         "int2"    "int3"    "int4"
         "long2"   "long3"   "long4"
         "float2"  "float3"  "float4"
         "double2" "double3" "double4")))

(defcustom okl-font-lock-extra-types nil
  "*List of extra types (aside from the type keywords) to recognize in OKL mode.
Each list item should be a regexp matching a single identifier.")

(defconst okl-font-lock-keywords-1 (c-lang-const c-matchers-1 objc)
  "Minimal highlighting for OKL mode.")

(defconst okl-font-lock-keywords-2 (c-lang-const c-matchers-2 objc)
  "Fast normal highlighting for OKL mode.")

;; Set @annotation coloring from java-mode
(defconst okl-font-lock-keywords-3 (c-lang-const c-matchers-3 java)
  "Accurate normal highlighting for OKL mode.")

(defvar okl-font-lock-keywords okl-font-lock-keywords-3
  "Default expressions to highlight in OKL mode.")

(defvar okl-mode-map
  (let ((map (c-make-inherited-keymap)))
    map)
  "Keymap used in okl-mode buffers.")

(easy-menu-define okl-menu okl-mode-map "OKL Mode Commands"
  (cons "OKL" (c-lang-const c-mode-menu okl)))

(defvar okl-mode-syntax-table nil
  "Syntax table used in okl-mode buffers.")
(or okl-mode-syntax-table
    (setq okl-mode-syntax-table
          (funcall (c-lang-const c-make-mode-syntax-table objc))))
<commit_msg>[Dev] Updates annotation coloring<commit_after>(require 'cc-mode)

(eval-when-compile
  (require 'cc-langs)
  (require 'cc-fonts))

(eval-and-compile
  (c-add-language 'okl-mode 'objc-mode))

(c-lang-defconst c-primitive-type-kwds
  "Primitives"
  okl (append
       (append (c-lang-const c-primitive-type-kwds) nil)
       '("bool2"   "bool3"   "bool4"
         "char2"   "char3"   "char4"
         "short2"  "short3"  "short4"
         "int2"    "int3"    "int4"
         "long2"   "long3"   "long4"
         "float2"  "float3"  "float4"
         "double2" "double3" "double4")))

(defcustom okl-font-lock-extra-types nil
  "*List of extra types (aside from the type keywords) to recognize in OKL mode.
Each list item should be a regexp matching a single identifier.")

(defconst okl-font-lock-keywords-1 (c-lang-const c-matchers-1 objc)
  "Minimal highlighting for OKL mode.")

(defconst okl-font-lock-keywords-2 (c-lang-const c-matchers-2 objc)
  "Fast normal highlighting for OKL mode.")

;; Set @annotation coloring
(defconst okl-font-lock-keywords-3
  (append
   (c-lang-const c-matchers-3 objc)
   `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face))))
  "Accurate normal highlighting for OKL mode.")

(defvar okl-font-lock-keywords okl-font-lock-keywords-3
  "Default expressions to highlight in OKL mode.")

(defvar okl-mode-map
  (let ((map (c-make-inherited-keymap)))
    map)
  "Keymap used in okl-mode buffers.")

(easy-menu-define okl-menu okl-mode-map "OKL Mode Commands"
  (cons "OKL" (c-lang-const c-mode-menu okl)))

(defvar okl-mode-syntax-table nil
  "Syntax table used in okl-mode buffers.")
(or okl-mode-syntax-table
    (setq okl-mode-syntax-table
          (funcall (c-lang-const c-make-mode-syntax-table objc))))

{'fraction_non_alphanumeric': 0.14875549048316253, 'fraction_numerical': 0.017276720351390922, 'mean_word_length': 3.1256038647342996, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4359495', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1284, 'n_words': 317}