<commit_before>;;;;; tré – Copyright (c) 2009–2014 <NAME> <<EMAIL>>

(defun c-make-decl (name)
  (format nil "treptr ~A;~%" (obfuscated-identifier name)))

(defmacro c-define-compiled-literal (name (x table) &key maker init-maker)
  `(define-compiled-literal ,name (,x ,table)
	   :maker      ,maker
	   :init-maker ,init-maker
	   :decl-maker #'c-make-decl))

(c-define-compiled-literal c-compiled-number (x number)
  :maker ($ 'trenumber_compiled_ (gensym-number))
  :init-maker `(tregc_add_unremovable (number_get_float (%%native ,x))))

(c-define-compiled-literal c-compiled-char (x char)
  :maker ($ 'trechar_compiled_ (char-code x))
  :init-maker `(tregc_add_unremovable (number_get_char (%%native ,(char-code x)))))

(c-define-compiled-literal c-compiled-string (x string)
  :maker ($ 'trestring_compiled_ (gensym-number))
  :init-maker `(tregc_add_unremovable (trestring_get (%%native (%%string ,x)))))

(c-define-compiled-literal c-compiled-symbol (x symbol)
  :maker ($ 'tresymbol_compiled_ x (? (keyword? x) '_keyword ""))
  :init-maker `(tregc_add_unremovable (symbol_get (%%native (%%string ,(symbol-name x)))
			                                      ,(? (keyword? x)
				                                      'tre_package_keyword
				                                      'treptr_nil))))
<commit_msg>Update to new symbol API.<commit_after>;;;;; tré – Copyright (c) 2009–2014 <NAME> <<EMAIL>>

(defun c-make-decl (name)
  (format nil "treptr ~A;~%" (obfuscated-identifier name)))

(defmacro c-define-compiled-literal (name (x table) &key maker init-maker)
  `(define-compiled-literal ,name (,x ,table)
	   :maker      ,maker
	   :init-maker ,init-maker
	   :decl-maker #'c-make-decl))

(c-define-compiled-literal c-compiled-number (x number)
  :maker ($ 'trenumber_compiled_ (gensym-number))
  :init-maker `(tregc_add_unremovable (number_get_float (%%native ,x))))

(c-define-compiled-literal c-compiled-char (x char)
  :maker ($ 'trechar_compiled_ (char-code x))
  :init-maker `(tregc_add_unremovable (number_get_char (%%native ,(char-code x)))))

(c-define-compiled-literal c-compiled-string (x string)
  :maker ($ 'trestring_compiled_ (gensym-number))
  :init-maker `(tregc_add_unremovable (trestring_get (%%native (%%string ,x)))))

(c-define-compiled-literal c-compiled-symbol (x symbol)
  :maker ($ 'tresymbol_compiled_ x (? (keyword? x) '_keyword ""))
  :init-maker `(tregc_add_unremovable (symbol_get_packaged (%%native (%%string ,(symbol-name x)))
			                                               ,(? (keyword? x)
				                                               'tre_package_keyword
				                                               'treptr_nil))))

{'fraction_non_alphanumeric': 0.15956651718983558, 'fraction_numerical': 0.005979073243647235, 'mean_word_length': 3.0622154779969653, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009302', 'n_tokens_mistral': 977, 'n_tokens_neox': 901, 'n_words': 194}