Skip to content

Conversation

gen740
Copy link

@gen740 gen740 commented Mar 19, 2025

According to the C99 standard (ISO/IEC 9899:TC3, §7.17), wchar_t is explicitly classified as an integer type, similar to size_t and ptrdiff_t, both of which are classified as primitive types in tree-sitter-c.

Moreover, in C++, wchar_t is explicitly classified as a fundamental type in the standard (basic.fundamental).

To maintain consistency, wchar_t should also be classified as a primitive type in tree-sitter-c, ensuring correctness across both C and C++.

Additionally, the type char64_t is currently classified as a primitive type in this repository. However, char64_t does not appear in any standard, nor does it seem to exist in any known codebase. To improve accuracy, this PR removes char64_t from the classification.

@gen740 gen740 marked this pull request as draft March 19, 2025 04:43
@gen740 gen740 force-pushed the add_wchar_t_to_primitive_type branch from 2bcfe58 to cc5809f Compare March 19, 2025 05:14
@gen740 gen740 marked this pull request as ready for review March 19, 2025 05:19
The type `char64_t` does not exist in C/C++, so it has been removed to fix the grammar.
@gen740 gen740 changed the title feat(grammar): Add wchar_t to primitive types fix: incorrect primitive type definitions Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant