<commit_before>========================================
Errors inside ifdefs
========================================

#ifdef something
int x // no semicolon
#endif

int a;

#ifdef __cplusplus
extern "C" {
#endif

int c() { return 5; }

int b;

#ifdef __cplusplus
}
#endif

int c;

---

(translation_unit
  (preproc_ifdef
    (identifier)
    (ERROR (type_identifier) (identifier))
    (comment))
  (declaration (type_identifier) (identifier))
  (preproc_ifdef
    (identifier)
    (linkage_specification
      (string_literal)
      (declaration_list
        (ERROR)
        (function_definition
          (type_identifier)
          (function_declarator (identifier) (parameter_list))
          (compound_statement (return_statement (number_literal))))
        (declaration (type_identifier) (identifier))
        (ERROR (identifier)))))
  (declaration (type_identifier) (identifier)))

========================================
Errors inside blocks
========================================

int main() {
  int x;
  int %$#@
}

---

(translation_unit
  (function_definition
    (type_identifier)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration (type_identifier) (identifier))
      (ERROR (identifier) (UNEXPECTED '$')))))

========================================
Errors inside expressions
========================================

int main() {
  int x = (123 123);
}

---

(translation_unit
  (function_definition
    (type_identifier)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration (type_identifier) (init_declarator
        (identifier)
        (parenthesized_expression
          (number_literal)
          (ERROR (number_literal))))))))

========================================
Errors in declarations
========================================

float x WTF;
int y = 5;

---

(translation_unit
  (declaration (type_identifier) (ERROR (identifier)) (identifier))
  (declaration (type_identifier) (init_declarator (identifier) (number_literal))))

==========================================
Errors at the beginnings of blocks
==========================================

int a() {
  struct x = 1;
  struct y = 2;
}

int b() {
  w x y z = 3;
  w x y z = 4;
}

---

(translation_unit
  (function_definition
    (type_identifier)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (struct_specifier (type_identifier))
      (ERROR (number_literal))
      (struct_specifier (type_identifier))
      (ERROR (number_literal))))

  (function_definition
    (type_identifier)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration<commit_msg>Update error corpus to reflect C grammar changes<commit_after>========================================
Errors inside ifdefs
========================================

#ifdef something
int x // no semicolon
#endif

int a;

#ifdef __cplusplus
extern "C" {
#endif

int c() { return 5; }

int b;

#ifdef __cplusplus
}
#endif

int c;

---

(translation_unit
  (preproc_ifdef
    (identifier)
    (ERROR (primitive_type) (identifier))
    (comment))
  (declaration (primitive_type) (identifier))
  (preproc_ifdef
    (identifier)
    (linkage_specification
      (string_literal)
      (declaration_list
        (ERROR)
        (function_definition
          (primitive_type)
          (function_declarator (identifier) (parameter_list))
          (compound_statement (return_statement (number_literal))))
        (declaration (primitive_type) (identifier))
        (ERROR (identifier)))))
  (declaration (primitive_type) (identifier)))

========================================
Errors inside blocks
========================================

int main() {
  int x;
  int %$#@
}

---

(translation_unit
  (function_definition
    (primitive_type)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration (primitive_type) (identifier))
      (ERROR (primitive_type) (UNEXPECTED '$')))))

========================================
Errors inside expressions
========================================

int main() {
  int x = (123 123);
}

---

(translation_unit
  (function_definition
    (primitive_type)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration (primitive_type) (init_declarator
        (identifier)
        (parenthesized_expression
          (number_literal)
          (ERROR (number_literal))))))))

========================================
Errors in declarations
========================================

float x WTF;
int y = 5;

---

(translation_unit
  (declaration (primitive_type) (ERROR (identifier)) (identifier))
  (declaration (primitive_type) (init_declarator (identifier) (number_literal))))

==========================================
Errors at the beginnings of blocks
==========================================

int a() {
  struct x = 1;
  struct y = 2;
}

int b() {
  w x y z = 3;
  w x y z = 4;
}

---

(translation_unit
  (function_definition
    (primitive_type)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (struct_specifier (type_identifier))
      (ERROR (number_literal))
      (struct_specifier (type_identifier))
      (ERROR (number_literal))))

  (function_definition
    (primitive_type)
    (function_declarator (identifier) (parameter_list))
    (compound_statement
      (declaration
{'fraction_non_alphanumeric': 0.24276821677041377, 'fraction_numerical': 0.004393994873672647, 'mean_word_length': 4.2936046511627906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '354580', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1517, 'n_words': 354}