<commit_before>/*
Language: C-like foundation grammar for C/C++ grammars
Author: <NAME> <<EMAIL>>
Contributors: <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, Google Inc. (<NAME>) <<EMAIL>>
Category: common, system
*/

/* In the future the intention is to split out the C/C++ grammars distinctly
since they are separate languages.  They will likely share a common foundation
though, and this file sets the groundwork for that - so that we get the breaking
change in v10 and don't have to change the requirements again later.

See: https://github.com/highlightjs/highlight.js/issues/2146
*/

/** @type LanguageFn */
export default function(hljs) {
  function optional(s) {
    return '(?:' + s + ')?';
  }
  // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does 
  // not include such support nor can we be sure all the grammars depending
  // on it would desire this behavior
  var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
    contains: [{begin: /\\\n/}]
  });
  var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)'
  var NAMESPACE_RE = '[a-zA-Z_]\\w*::'
  var TEMPLATE_ARGUMENT_RE = '<.*?>';
  var FUNCTION_TYPE_RE = '(' +
    DECLTYPE_AUTO_RE + '|' +
    optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
  ')';
  var CPP_PRIMITIVE_TYPES = {
    className: 'keyword',
    begin: '\\b[a-z\\d_]*_t\\b'
  };

  // https://en.cppreference.com/w/cpp/language/escape
  // \\ \x \xFF \u2837 \u00323747 \374
  var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)'
  var STRINGS = {
    className: 'string',
    variants: [<commit_msg>chore(website) remove c-like from the common list<commit_after>/*
Language: C-like foundation grammar for C/C++ grammars
Author: <NAME> <<EMAIL>>
Contributors: <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, Google Inc. (<NAME>) <<EMAIL>>
*/

/* In the future the intention is to split out the C/C++ grammars distinctly
since they are separate languages.  They will likely share a common foundation
though, and this file sets the groundwork for that - so that we get the breaking
change in v10 and don't have to change the requirements again later.

See: https://github.com/highlightjs/highlight.js/issues/2146
*/

/** @type LanguageFn */
export default function(hljs) {
  function optional(s) {
    return '(?:' + s + ')?';
  }
  // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does
  // not include such support nor can we be sure all the grammars depending
  // on it would desire this behavior
  var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
    contains: [{begin: /\\\n/}]
  });
  var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)'
  var NAMESPACE_RE = '[a-zA-Z_]\\w*::'
  var TEMPLATE_ARGUMENT_RE = '<.*?>';
  var FUNCTION_TYPE_RE = '(' +
    DECLTYPE_AUTO_RE + '|' +
    optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
  ')';
  var CPP_PRIMITIVE_TYPES = {
    className: 'keyword',
    begin: '\\b[a-z\\d_]*_t\\b'
  };

  // https://en.cppreference.com/w/cpp/language/escape
  // \\ \x \xFF \u2837 \u00323747 \374
  var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)'
  var STRINGS = {
    className: 'string',
    variants: [
{'fraction_non_alphanumeric': 0.18063932448733414, 'fraction_numerical': 0.018697225572979495, 'mean_word_length': 3.5314207650273226, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 4, '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': '7114655', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1217, 'n_words': 323}